this may be a stupid question...
how do I create a parameter query that is the equivalent of
where x contains "something" and the results return all entries that
have the word something anywhere in the field
I know I can use Like with an * but I'd rather not.
> this may be a stupid question...
> how do I create a parameter query that is the equivalent of
> where x contains "something" and the results return all entries that
> have the word something anywhere in the field
> I know I can use Like with an * but I'd rather not.
Why don't you want to use Like with an * ? As that is the obvious and
regular answer to the question.
SELECT anything FROM yourtable WHERE x Like '*something*'
If you want to pass the something part as parameter, the SQL looks like this
SELECT anything FROM yourtable WHERE x Like '[yourparameter]'
and you should supply the *'s with the parameter value. I haven't got
this working in another way.

Signature
Bas Cost Budde, Holland
http://www.heuveltop.nl/BasCB/msac_index.html
I prefer human mail above automated so in my address
replace the queue with a tea
Impy - 30 Dec 2004 15:34 GMT
Hi, Thanks for your reply. I figured that was the answer. I would like
to avoid using the * because the users of this database are not as
smart and don't always know to put the * in front or behind depending
on what data they are looking for. I just thought it would be nice to
make it painless for them.
Ken Snell - 30 Dec 2004 16:34 GMT
Use a criterion expression similar to this:
Like "*" & [Enter the parameter:] & "*"

Signature
Ken Snell
<MS ACCESS MVP>
> Hi, Thanks for your reply. I figured that was the answer. I would like
> to avoid using the * because the users of this database are not as
> smart and don't always know to put the * in front or behind depending
> on what data they are looking for. I just thought it would be nice to
> make it painless for them.
Impy - 31 Dec 2004 23:42 GMT
Thanks! Can't wait to try it out!