By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,671 Members | 1,278 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,671 IT Pros & Developers. It's quick & easy.

I fear

P: n/a
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.

Nov 13 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Impy wrote:
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.
--
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
Nov 13 '05 #2

P: n/a
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.

Nov 13 '05 #3

P: n/a
Use a criterion expression similar to this:

Like "*" & [Enter the parameter:] & "*"
--

Ken Snell
<MS ACCESS MVP>

"Impy" <im******@yahoo.com> wrote in message
news:11**********************@c13g2000cwb.googlegr oups.com...
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.

Nov 13 '05 #4

P: n/a
Thanks! Can't wait to try it out!

Nov 13 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.