Syntax for Access Query

A

akkrug

Can I use a wild card criteria in an Access select query? For example, I
have [Enter Signature] on the Criteria line under the Signature field. The
only way it works is if the criteria is entered exactly. I would like to be
able to have the user enter as much of the name as they know and still be
able to find what they are looking for. For example if they keyed smi, I
would like to have the query find smith, smitty, etc. Is there any way to do
this?

Thanks for the help!!

Ken K.
 
D

Douglas J. Steele

Instead of [Enter Signature], put

Like [Enter Signature] & "*"

If you put

Like "*" & [Enter Signature] & "*"

then it will look for what they keyed anywhere in the field: in addition to
the possibilities you listed, it would also find Aerosmith.
 
A

akkrug

Thanks Doug. It works perfectly!!

Ken
--
akkrug


Douglas J. Steele said:
Instead of [Enter Signature], put

Like [Enter Signature] & "*"

If you put

Like "*" & [Enter Signature] & "*"

then it will look for what they keyed anywhere in the field: in addition to
the possibilities you listed, it would also find Aerosmith.

--
Doug Steele, Microsoft Access MVP

(no e-mails, please!)


akkrug said:
Can I use a wild card criteria in an Access select query? For example, I
have [Enter Signature] on the Criteria line under the Signature field.
The
only way it works is if the criteria is entered exactly. I would like to
be
able to have the user enter as much of the name as they know and still be
able to find what they are looking for. For example if they keyed smi, I
would like to have the query find smith, smitty, etc. Is there any way to
do
this?

Thanks for the help!!

Ken K.
 

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