using wildcard in a query

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a very simple query which just looks up a description and location. In
criteria I put [Enter Desc] but I have to spell it out in order o get data
back. expl. If I wanted to see all filters of various sizes I would have to
enter the wole description.
What I want to do is enter just the first 1 or 2 letters and it would show
me all criteria matching that entry. example for filters 3X3, etc. I would
like to be able to enter just fi or fil. Any help out there?
Thanks, kathy
 
Use

Like [Enter desc] & "*"

as the criterion. The "*" is the wildcard. If you look up "wildcard in
parameter query" in Access help there is a more detailed description.

Alice
 
Thanks Rob but used Alice's answer. I was simpler and I am a simple person :O)
Kathy

RobFMS said:
If the name of your field is called [Desc], set the WHERE clause like this:

Select ...
From ...
Where [Desc] LIKE "*" & Me.txtDesc & "*".

HTH

--
Rob

FMS Professional Solutions Group
http://www.fmsinc.com/consulting

Software Tools for .NET, SQL Server, Visual Basic & Access
http://www.fmsinc.com

-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Kathy said:
I have a very simple query which just looks up a description and location. In
criteria I put [Enter Desc] but I have to spell it out in order o get data
back. expl. If I wanted to see all filters of various sizes I would have to
enter the wole description.
What I want to do is enter just the first 1 or 2 letters and it would show
me all criteria matching that entry. example for filters 3X3, etc. I would
like to be able to enter just fi or fil. Any help out there?
Thanks, kathy
 
Thanks Alice....worked like a charm.
Kathy

Alice Dawson said:
Use

Like [Enter desc] & "*"

as the criterion. The "*" is the wildcard. If you look up "wildcard in
parameter query" in Access help there is a more detailed description.

Alice

Kathy said:
I have a very simple query which just looks up a description and location. In
criteria I put [Enter Desc] but I have to spell it out in order o get data
back. expl. If I wanted to see all filters of various sizes I would have to
enter the wole description.
What I want to do is enter just the first 1 or 2 letters and it would show
me all criteria matching that entry. example for filters 3X3, etc. I would
like to be able to enter just fi or fil. Any help out there?
Thanks, kathy
 
Back
Top