Search Query by Wildcard

M

mikemcg36

I have a simple database switchboard with a few queries on it (Search by
company, search by city, etc.) When a user hits the button a box pops up
thats says "Enter Company Name", thats what I put in the criteria field in
the design view.

I want the user to be able to type "Memorial *" or whatever the wildcard may
be and have the database return Memorial Medical Center. Is this something
that can be done without a lot of programming experience? Any help is much
appreciated.

Mike
 
M

Michel Walsh

Sure, instead of using equal, =, use the keyword LIKE in your criteria.

Vanderghast, Access MVP
 
M

mikemcg36

When the box pops up that says "Enter Company Name", I type "like memorial"
and 1 blank record pops up. I tried every combination of memorial and like
that I could think of. Am I doing something wrong?

Michel said:
Sure, instead of using equal, =, use the keyword LIKE in your criteria.

Vanderghast, Access MVP
I have a simple database switchboard with a few queries on it (Search by
company, search by city, etc.) When a user hits the button a box pops up
[quoted text clipped - 8 lines]
 
M

Marshall Barton

mikemcg36 said:
I have a simple database switchboard with a few queries on it (Search by
company, search by city, etc.) When a user hits the button a box pops up
thats says "Enter Company Name", thats what I put in the criteria field in
the design view.

I want the user to be able to type "Memorial *" or whatever the wildcard may
be and have the database return Memorial Medical Center. Is this something
that can be done without a lot of programming experience? Any help is much
appreciated.


That's kind of a crude way to do things, but it should work
if you set the criteria to:

Like [Enter Company Name] & "*"
 
T

Tom van Stiphout

Yes. You probably currently have a query with a criterion like this:
=[Enter Company Name]

Change that to:
LIKE [Enter Company Name]

-Tom.
Microsoft Access MVP
 
M

mikemcg36

It worked with like in front of the [enter company name].

Thank you all for the help!
Yes. You probably currently have a query with a criterion like this:
=[Enter Company Name]

Change that to:
LIKE [Enter Company Name]

-Tom.
Microsoft Access MVP
I have a simple database switchboard with a few queries on it (Search by
company, search by city, etc.) When a user hits the button a box pops up
[quoted text clipped - 7 lines]
 

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