making an advaced search form

Pooya.Alipour

Registered User.
Local time
Today, 04:37
Joined
Oct 9, 2011
Messages
12
I want to make a form that contains three fields and in front each field there's a check box. I want to search by those fields ( Code , Name , Family ) and I want to make those fields related to check boxes So the user can search by differrent parameters. Finally the information will be shown in a seperate form. Please help me to do this.
 
I've done something like that in the past but now my problem is different
 
So if the check box is checked you want the data in the text box to be part of the search criteria, and if the check box is blank the field forms no part of the search criteria?
 
Last edited:
In the criteria of your query try the following for each field;
Code:
Like Iif([Forms]![YourFormName]![CheckName]=0, "*", [Forms]![YourFormName]![RelatedFieldName]

Before your query is fired, you will need some code to ensure that fields related to checked check boxes contain appropriate data.
 
That's the way I might do want your looking for. I'd then use the query as the Record Source for your form.
 

Users who are viewing this thread

Back
Top Bottom