perameter query

C

cschless

I have set up a name search query with a perameter box.
However, the query will only work when I enter the full
name that is listed in the field eg John Smith, where as I
would like to search all Johns' or all Smiths'. ie search
Smith and have returns of all the smiths on the database.
How can I do this?
 
F

fredg

I have set up a name search query with a perameter box.
However, the query will only work when I enter the full
name that is listed in the field eg John Smith, where as I
would like to search all Johns' or all Smiths'. ie search
Smith and have returns of all the smiths on the database.
How can I do this?

To return the entered name anywhere in the field:
Like "*" & [Enter Name] & "*"

To return the entered name at the beginning of the field:
Like [Enter Name] & "*"

To return the entered name at the end of the field:
Like "*" & [Enter Name]
 

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