Wildcard Question

  • Thread starter Thread starter Jason
  • Start date Start date
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.
.
.
 
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.
.
.
.
 
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.
.
.
 
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.
.
.
 
Back
Top