By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,493 Members | 1,233 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,493 IT Pros & Developers. It's quick & easy.

Execute/run Query with filter

P: 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
Share this Question
Share on Google+
3 Replies


MMcCarthy
Expert Mod 10K+
P: 14,534
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

P: 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
Expert Mod 10K+
P: 14,534
Excellent. thank you :-)
You're welcome.
Oct 17 '07 #4

Post your reply

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