Parameter query: how to display all if nothing is entered

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

Guest

Hello,
I apologise if this is a duplicate post, my connection dropped just as I had
sent the previous one.
I am working on a database that has a parameter query for searching for a
specific breed of dog. I also what that query to display all available
breeds if the user hits ok or cancel. Is that possible? I can do the search
for a specific breed, but I am uncertain how to code the search to list all
breeds if nothing is entered. Access is new to our business and I am fairly
new to access, I am trying to update our current files to Access.
Thank you!
~spookyg~
 
~spookyg~ said:
Hello,
I apologise if this is a duplicate post, my connection dropped just as I had
sent the previous one.
I am working on a database that has a parameter query for searching for a
specific breed of dog. I also what that query to display all available
breeds if the user hits ok or cancel. Is that possible? I can do the search
for a specific breed, but I am uncertain how to code the search to list all
breeds if nothing is entered. Access is new to our business and I am fairly
new to access, I am trying to update our current files to Access.
Thank you!
~spookyg~

SELECT *
FROM DogTable
WHERE (((Breed)=[Enter Breed] Or [Enter Breed] Is Null));

You must make the two parameter marker texts exactly identical.
 

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

Back
Top