473,434 Members | 4,837 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,434 software developers and data experts.

Execute/run Query with filter

6
Hello! Newbie strikes again. ;-)

I have a form where a user selects a checkbox for an action as well as chooses a date from a combo box. One of the items to select is a report. This I found simple to execute from a macro where the chosen form date is then used as a filter for the report.

Now, I am trying to do the same operation with running a Query without success. My query has no "built in" filter, but I'd like to filter a date column in the query with the date the user has chosen from the menu combo box. Surely this must be simple and I am missing something?! Thanks!
Oct 16 '07 #1
3 2466
MMcCarthy
14,534 Expert Mod 8TB
Set the criteria on the date field of the query to ...

[Forms]![FormName]![ComboboxName]

In this case the Form Name is the form with the combobox on it. The Combobox name of the combobox on the form. Remember the form needs to be open when running the query and will throw an error is no date selected in the combobox.
Oct 16 '07 #2
wrcdc
6
Excellent. thank you :-)

Set the criteria on the date field of the query to ...

[Forms]![FormName]![ComboboxName]

In this case the Form Name is the form with the combobox on it. The Combobox name of the combobox on the form. Remember the form needs to be open when running the query and will throw an error is no date selected in the combobox.
Oct 16 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
Excellent. thank you :-)
You're welcome.
Oct 17 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

8
by: Együd Csaba | last post by:
Hi All, how can I improve the query performance in the following situation: I have a big (4.5+ million rows) table. One query takes approx. 9 sec to finish resulting ~10000 rows. But if I run...
5
by: Rated R1 | last post by:
I wrote this before in the NGs, so I am going to paste the responses that I got and see if someone can please help me. Email me and we can set something up as Id even be willing to pay for your...
6
by: Brian | last post by:
Hello, Basically, I'm running a query on a form's activation, and I'd like to have the results of the query be placed into other fields on the same form automatically. Does anybody know how...
5
by: jjyconsulting | last post by:
Newbie needing some help. I have a tblParticipants. The fields include gender, education_level, income, occupation etc., I'm trying to create a form where a user can run a query from the form and...
4
by: Simon | last post by:
Dear reader, The syntax for Docmd.OpenReport is: OpenReport(ReportName, View, FilterName, WhereCondition, WindowMode, OpenArgs) Example The following example prints Sales Report while...
1
by: TF | last post by:
This group came through for me last time so here we go again. My page shows paint colors, brand name, product code, etc in a gridview with the background matching the paint color. Several links on...
1
by: lorirobn | last post by:
Hi, I have a list box on a form, whose row source points to a separate query. The query refers to a field on the form to filter records on the list box, like such: WHERE tblA.DesignType = !!...
0
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I am running Access 2007. I have a report that I want to filter. I can go into Advanced...Advanced Filter/Sort... and setup a filter that works fine on the report when I apply it. When in this...
0
by: Andrew Meador - ASCPA, MCSE, MCP+I, Network+, A+ | last post by:
I am running Access 2007. I have a report that I want to filter. I can go into Advanced...Advanced Filter/Sort... and setup a filter that works fine on the report when I apply it. When in this...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.