Can you use a parameter query and expressions together in Access?

G

Guest

I am trying to create a search of keywords from a table in a parameter query.
Is there anyway to create this without having to type it exactly as it
appears in whole in the table. I want to just pull one keyword, not all.
Thank you for any help.
 
F

fredg

I am trying to create a search of keywords from a table in a parameter query.
Is there anyway to create this without having to type it exactly as it
appears in whole in the table. I want to just pull one keyword, not all.
Thank you for any help.

As criteria on the field to be searched, write:
Like "*" & [Search for?] & "*"

The above will find the prompted word anywhere in the field.
If you are looking in more than one field, you need to place the same
criteria in each field to be searched BUT place it on the next row
down., so that it becomes an OR where clause.
The SQL Where clause will read something like this:

Where TableName.LastName Like "*" & [Search for?] & "*" Or
TableName.CompanyName Like "*" & [Search for?] & "*";
 

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