Specifying Criteria

  • Thread starter Thread starter Lost In Queries
  • Start date Start date
L

Lost In Queries

I have created a Select Query which prompts users for a
specific test type from the main table. This portion
works as expected. How can I construct the query so that
if the user wants to see all records, they can just hit
enter at the prompt and the records would be displayed?

thanks in advance

john
 
make your criteria like...


Like [EnterSomeData] & "*"



If the user enters "SMITH" the query would return all records where the
entry starts with SMITH (like "SMITH*")

If the user leaves it blank, all records would be returned (like "*")


Rick B

I have created a Select Query which prompts users for a
specific test type from the main table. This portion
works as expected. How can I construct the query so that
if the user wants to see all records, they can just hit
enter at the prompt and the records would be displayed?

thanks in advance

john
 
Heres a better way which uses a special chacracter (in
this case '%') for 'all'. In addition, you only get exact
matches when you put in your criteria (the last reply to
your question would return smith, smithson, smithe, etc.)

WHERE (([Account].Acct_ID)=[Enter ID or % for all]) OR
(("%")=[Enter ID or % for all]);

DOTJake
 
Back
Top