How to let a query omit the search key sometimes

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have built a search function with a query. I have a form with a ComboBox to let me select the key I want to search. After I press a CmdButton, a result form is open through a query.
My first problem is if I want to omit the key sometimes, that is to retrieve all data, How can do it
My second problem is how to let a message show up if no data is found?
Thank you.
 
I have built a search function with a query. I have a form with a ComboBox to let me select the key I want to search. After I press a CmdButton, a result form is open through a query.
My first problem is if I want to omit the key sometimes, that is to retrieve all data, How can do it?

Use a criterion of

=Forms!formname!comboname OR Forms!formname!comboname IS NULL
 

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

Similar Threads

Query Key 3
Query problem 2
Access MS access forms list box problems 1
search multiple criteria 0
Omit records from MS Access 2007 query 5
expressions to omit info 4
Excel JUMP FROM SEARCH BAR TO RESULT 3
Query - Omit records 14

Back
Top