Parameter query using wildcard? Beginner level

  • Thread starter Thread starter abqhusker
  • Start date Start date
A

abqhusker

I have a table containing my cd collection. I want a query where I can
just type part of a string and it'll select those records. E.g. When I
double click on the query and the parameter box pops up, I have to type
"Rick Wakeman" or "*wakeman*" to get all the Rick Wakeman records to
show up under the Artist field. I want to be able to type "wakeman" or
"wake" without the * or the exact name and have all Rick Wakeman records
returned in the query. That's the main thing I'm wanting to figure out
but I do have a second related type of question. Is it possible to have
a query same as above, but instead of just returning matching records
from the Artist field, will return all records where the string is in
any of the other fields in the table, e.g. Album Name field. I'm hoping
it can be done simply from the query design window as I'm not too smart
on SQL and VBA. Appreciate any help or tips. Thanks. Now that I think
about it. I can't remember how I got the parameter popup box to come on
any more...was it by putting brackets in the criteria row? Shoot!!!
Help!!!

Ed
 
Presumably you have something like this in the Criteria row of your query:
Like [Wot Name]

Add the wildcards like this:
Like "*" & [Wot Name] & "*"
 
If you want to search multiple fields for this string, (eg album title and
artist) you can put that same line that Allen gave you in a new "OR" row
under each field you want to search. Just make sure each one is on a
separate OR row, like this:

Artist
Album

criteria Like "*" & [Enter Search String] & "*"
or:
Like "*" & [Enter Search String] & "*"

good luck
-John

----- Original Message -----
From: "Allen Browne" <[email protected]>
Newsgroups: microsoft.public.access
Sent: Tuesday, May 02, 2006 9:46 PM
Subject: Re: Parameter query using wildcard? Beginner level

Presumably you have something like this in the Criteria row of your query:
Like [Wot Name]

Add the wildcards like this:
Like "*" & [Wot Name] & "*"

--
Allen Browne - Microsoft MVP. Perth, Western Australia.

Reply to group, rather than allenbrowne at mvps dot org.

abqhusker said:
I have a table containing my cd collection. I want a query where I can
just type part of a string and it'll select those records. E.g. When I
double click on the query and the parameter box pops up, I have to type
"Rick Wakeman" or "*wakeman*" to get all the Rick Wakeman records to show
up under the Artist field. I want to be able to type "wakeman" or "wake"
without the * or the exact name and have all Rick Wakeman records returned
in the query. That's the main thing I'm wanting to figure out but I do
have a second related type of question. Is it possible to have a query
same as above, but instead of just returning matching records from the
Artist field, will return all records where the string is in any of the
other fields in the table, e.g. Album Name field. I'm hoping it can be
done simply from the query design window as I'm not too smart on SQL and
VBA. Appreciate any help or tips. Thanks. Now that I think about it. I
can't remember how I got the parameter popup box to come on any more...was
it by putting brackets in the criteria row? Shoot!!! Help!!!

Ed
 

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

Back
Top