Change Query Cretia from Form

Luddite Lad

Registered User.
Local time
Tomorrow, 09:47
Joined
Aug 23, 2005
Messages
177
I have a form based on a query, I would like to add additional criteria to the query dependant on the status of a check box. Is this possible if so what would the code look like?
 
you'll probably need code. I'm thinking an IF statement checking if the check box is NULL if not run your query.
 
In your query enter the following into the criteria of the fields you wish to use:
[Forms]![Form1]![Text#]

With Form1 being the name of the form and Text# being the text box that contains the criteria.
You will have to create a macro or do coding for a command button to run the query from the form.
 
Thanks guys yes I had got as far as both of you had suggested, and I realise I need to implement some code. What I'm wondering is can I us code to add additional criteria to the query dependant on the state of a check box, and what would that code look like, if it can be done that way?
 

Users who are viewing this thread

Back
Top Bottom