Help with Search Form Results

A

al624

I have set up a search form that queries a database. In the search form are
different fields to search. The form works fine if I just search one of the
fields, but if I try to narrow down the search by entering information into 2
fields, the results are not narrowed down. i.e. If I search by last name and
city instead of getting only the people with that specific last name in the
city, I get everyone in that city.

Please help!
 
K

Kathleen Anderson [MVP - FP]

Check you SQL - you are probably using 'or' and instead of 'and'.
 
A

al624

Thanks for your help. That was what I was missing.

Now, I'm trying to query by last name with a text box and city with a
drop-down box. I am wanting to be able to leave either last name or city
empty and just search by the other, but it is not letting me do that. It is
requiring that I enter information into both fields.
Can you help me again?
 
Top