View Full Version : Filter a query on multiple criteria, including null???


wrekless
06-30-2000, 05:11 AM
Hi everyone,
I know there's a way to do this, I just can't remember/figure out how.

How do you set up a form (linked to a query)with a number of fields that can all be criteria in the query?

For example: Enter an product code, manufacturer and model number and search with all that criteria, OR just enter a manufacturer, and get all the results that comply with that?

PS. I have a command button that runs the query after one or more of the fields have been populated.

Pat Hartman
06-30-2000, 09:19 AM
You need to specifically check for nulls in the form fields.

Where (tblFldA = Form!yourformname!FldA OR Form!yourformname!FldA Is Null) AND (tblFldB = Form!yourformname!FldB OR Form!yourformname!FldB Is Null) AND (...);

The parentheses are important since you are combining AND and OR conditions in the same statement.