Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

can I search all fields in db in one query

Status
Not open for further replies.

g83man

Technical User
Feb 29, 2004
3
GB
I have a database with 15 fields which contain names refernce numbers dates descriptions etc. Is it possible to just enter 1 parameter and search all of the fields. The para could be a name number or description if you see what I mean , it needs to be like the find function in Excel.
thanks
 
A starting point (SQL snippet):
SELECT ...
FROM ...
WHERE ',' & [name] & ',' & [refernce number] & ',' & [date] & ',' & description & ',' Like '*,' & [search parameter] & ',*'

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Sorry about not replying but I thought I had put the query in the wrong forum. I'm new in the tek-tips forums and I didn't mean to ignore your help.

I can see what your getting but I'm not that experienced at SQL and don't know how to input a parameter. Can I do this from within a form?

Thanks for your help
 
Replace this:
& [search parameter] &
with something like this:
& [Forms]![name of form]![name of searched parameter control] &

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top