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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Three Parametes, One Query

Status
Not open for further replies.

Mitchy

Technical User
Jun 19, 2002
59
US
This is a simple question. I want to search records base on either my job number, PO number or customer name. Entering any one of these variables will return the info I need. Can a single query give me the flexibility to choose any one parameter and return my data?

Thanks,

Mitchy
 
the best solution is to have a form that gives the user the ability to select the values and then press a button to run the query. in the OnClick event of the button, create the query based on the form values.

FAQ701-2328 How to dynamically build a query from controls on a form
FAQ181-68 Get selection criteria from a form



Leslie

Anything worth doing is a lot more difficult than it's worth - Unknown Induhvidual

Essential reading for anyone working with databases:
The Fundamentals of Relational Database Design
Understanding SQL Joi
 
Thanks your your reply Leslie.

I am a very basic user of Access so your examples may be alittle deep.

This is what I want to happen: If I enter a customer name, the query will look up the PO and Job Number and aslo return the other related data. If I enter a PO, customer name, job number and info will be returned, etc.

So whatever identifying info can be used to pull the other data out of the tables. I know I could create three separate queries but I would like to do it in one.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top