Query - Default choices

S

Sam

I have a query where I choose based on criteria from a
table.
The item I am choosing from has items as A B C D
I want to choose either A or B when running a query,
however if I do not choose, then I want the query to run
showing all A's and B's - and not include C's or D's.

How can I put this into my query?
Thanks
Sam
 
M

Michel Walsh

Hi,



WHERE (( FORMS!FormName!ControlName Is NULL AND FieldName IN ('A', 'B') ) OR
FieldName=FORMS!FormName!ControlName)




Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top