Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / General 1 / December 2004

Tip: Looking for answers? Try searching our database.

I fear

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Impy - 30 Dec 2004 06:15 GMT
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.
Bas Cost Budde - 30 Dec 2004 10:48 GMT
> 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!
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.