Wildcard Question

M

markmidwest

Thanks for the fast response. I put that in my criteria
& it does the same thing, it just ignores wildcards and
makes me type in the entire name.

Any other suggestions?
-----Original Message-----
Try LIKE [Enter Search Criteria] & "*" as the criteria

Jason
-----Original Message-----
I am trying to create a simple query that will search on
a LASTNAME field. I would like the users to be able to
type in the first part of the name & see anything that
matches i.e. Mc* would retrieve McCloud, McMahon &
McNabe. I have tried several things but my searches only
work if I type in the entire last name.

Thanks in advance for any help.
.
.
 
J

Jason

Where did you paste the statement? I don't have any
problem when I try to use it. You should just get a
prompt saying "Enter Search Criteria". If you enter "Mc",
then all records starting with "Mc" should be returned.

You might paste the SQL of you query for some better
details about what is going on...

Jason
-----Original Message-----
Thanks for the fast response. I put that in my criteria
& it does the same thing, it just ignores wildcards and
makes me type in the entire name.

Any other suggestions?
-----Original Message-----
Try LIKE [Enter Search Criteria] & "*" as the criteria

Jason
-----Original Message-----
I am trying to create a simple query that will search on
a LASTNAME field. I would like the users to be able to
type in the first part of the name & see anything that
matches i.e. Mc* would retrieve McCloud, McMahon &
McNabe. I have tried several things but my searches only
work if I type in the entire last name.

Thanks in advance for any help.
.
.
.
 
V

Van T. Dinh

If you are using ADO then try:

LIKE [Enter Search Criteria] & "%"

as the criteria.

--
HTH
Van T. Dinh
MVP (Access)



markmidwest said:
Thanks for the fast response. I put that in my criteria
& it does the same thing, it just ignores wildcards and
makes me type in the entire name.

Any other suggestions?
-----Original Message-----
Try LIKE [Enter Search Criteria] & "*" as the criteria

Jason
-----Original Message-----
I am trying to create a simple query that will search on
a LASTNAME field. I would like the users to be able to
type in the first part of the name & see anything that
matches i.e. Mc* would retrieve McCloud, McMahon &
McNabe. I have tried several things but my searches only
work if I type in the entire last name.

Thanks in advance for any help.
.
.
 
R

Roger

I've found that you have to use % instead of *.

Syntax would be
SELECT LASTNAME FROM TBLCUSTOMERS WHERE LASTNAME LIKE 'Mc%'
-----Original Message-----
Try LIKE [Enter Search Criteria] & "*" as the criteria

Jason
-----Original Message-----
I am trying to create a simple query that will search on
a LASTNAME field. I would like the users to be able to
type in the first part of the name & see anything that
matches i.e. Mc* would retrieve McCloud, McMahon &
McNabe. I have tried several things but my searches only
work if I type in the entire last name.

Thanks in advance for any help.
.
.
 

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