Parameter Query - how to avoid needing wildcards

D

dnl

I have a parameter query that I would like to simplify so that I wouldn't
need to use wildcards when entering in partial data. The following line is
in the criteria field when designing the query:

Like [Enter last name]

Running the query brings up the dialog box to enter the parameter. If the
name I am looking for is Smith, I can type "smi*" to do a wildcard match.
Is there anyway to avoid needing the wildcard? I'd like my less-
knowledgeable database users to not have to remember the wildcard. If they
are looking for "Smith" I'd like them to just type in "smi" and have it
bring up all names that start with "smi". Any suggestions?

Thanks.
 
F

fredg

I have a parameter query that I would like to simplify so that I wouldn't
need to use wildcards when entering in partial data. The following line is
in the criteria field when designing the query:

Like [Enter last name]

Running the query brings up the dialog box to enter the parameter. If the
name I am looking for is Smith, I can type "smi*" to do a wildcard match.
Is there anyway to avoid needing the wildcard? I'd like my less-
knowledgeable database users to not have to remember the wildcard. If they
are looking for "Smith" I'd like them to just type in "smi" and have it
bring up all names that start with "smi". Any suggestions?

Thanks.

To search for records that begin with the entered phrase, i.e. "smi":
Like [Enter Last name] & "*"

To search for records that end with the entered phrase:
Like "*" & [Enter Last name]

To search for records that contain the phrase anywhere in the field:
Like "*" & [Enter Last 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