How do I use wildcards in a Parameter search in Access?

G

Guest

I am trying to make a user entered parameter query in Access 2003. I can't
seem to find a way to get wildcards into the search. For example, I want
users to be able to enter "3200" but have Access seach for "*3200*" to return
items such as "CP3200" or "3200XL".
 
F

fredg

I am trying to make a user entered parameter query in Access 2003. I can't
seem to find a way to get wildcards into the search. For example, I want
users to be able to enter "3200" but have Access seach for "*3200*" to return
items such as "CP3200" or "3200XL".

To find all records that begin with the entered phrase:
Like [Enter the phrase] & "*"

To find all records that end with the entered phrase:
Like "*" & [Enter the phrase]

To find all records with the phrase anywhere in the field:
Like "*" & [Enter the phrase] & "*"
 
G

Guest

Excellent! It works just fine now. Thanks a ton.

fredg said:
I am trying to make a user entered parameter query in Access 2003. I can't
seem to find a way to get wildcards into the search. For example, I want
users to be able to enter "3200" but have Access seach for "*3200*" to return
items such as "CP3200" or "3200XL".

To find all records that begin with the entered phrase:
Like [Enter the phrase] & "*"

To find all records that end with the entered phrase:
Like "*" & [Enter the phrase]

To find all records with the phrase anywhere in the field:
Like "*" & [Enter the phrase] & "*"
 

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