Multiple Lookup values in a query

  • Thread starter Thread starter wesley.allen
  • Start date Start date
W

wesley.allen

Hello,

I am trying to build a query that will allow me to search by a record
I select from a form using a combo box. I want to be able to make one
selection from several different options and have it apply to that
using only one query.

Example:

I will have a query about cars, where you can select by make or model
or color. You only need to select by color, and the results will come
up. Is there a way to do this with a single filter query, or do I
have to build a seperate qury for each?

In other words, can I put an if/then that will say if the combo box is
nill, slect all records for that column?

Thank you for looking.
 
You could put something like the following in each appropriate field in the
query:

Like "*" & [Forms]![frmParameter]![cboColor] & "*"

Like "*" & [Forms]![frmParameter]![cboModel] & "*"

One problem with wildcards is if there is a partial match. For example if
someone typed in "VETTE" for the model, both Corvette and Chevette would show
up.
 
Back
Top