Search on form using mulitple fields

iainmid

Registered User.
Local time
Today, 16:08
Joined
Mar 1, 2007
Messages
35
Hi

Im fairly new to access and am trying to find out how to create a form that searches a table using multiple fields.
I have Contacts table with the fields (Organisation, Address, Street, Town, Postcode, Telephone No, Main Activity, Secondary Activity).

I have created a Search form which i have four text boxes named (Organisation, Postcode, Main Activity, Secondary Activity) and a command button.

I want to be able to use this form to enter data into these text boxes and on click of the command button it matches with the data in the contacts table.

The problem im having is because i want the search to be able to work if some of the fields on the search form are null for example so i can do a search only with Organisation, Postcode and Main Activity.
Is this possible just using one command button?
 
Yes, it is possible, but it is easyer via FILTER BY FORM, CLEAR GRID, APPLY FILTER and REMOVE FILTER icons.
 
How would i go about doing this using the search form i have setup.

I have been using an sql query with the fields on my search form as parameters but this only works if you enter data into all of the fields. i need to somehow say if one field is null don't use in the query
 

Users who are viewing this thread

Back
Top Bottom