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

Multiple parameters for parameter query

Status
Not open for further replies.

beadgirl

Technical User
Feb 11, 2003
13
US
Hi! I'm working on an inventory mgmt db and need to query for a group of layout numbers, each consisting of many part numbers. I have a parameter query set up - basically you enter the layout number and it brings up the list of part numbers needed for the layout. NOW... How can I enter more than one layout number? These are not neatly arranged for a "between x and y" query. If Store ABC needs 10 different layouts, each consisting of 5 part numbers each, can I somehow enter 10 different layout numbers into the query? I am semi-competent at trial-and-error SQL and VB editing, if there's a way to do it that way. The ultimate goal is to be able to use values from an excel spreadsheet (some stores will have 100 or more layouts).
Thanks!
 
If the users are entering the layout numbers in a text box of some sort you can specify/check that there is a comma between each layout number. Then in your query:

Select * from table where layoutnumber IN (textbox)

HTH Leslie
landrews@metrocourt.state.nm.us

There are 10 types of people in the world -
those who understand binary
and
those who don't!
 
Leslie,
You are the best! I set up a fake table with some layout numbers. Made a query with your SQL statement to get all the values in the table. Added that query to my original query that dumps data to my report. Joined the Layout field from the new query with the Layout field in the original query. Works like a charm! [thumbsup2]
Thanks a million, and I love your sig, btw!
Diane
beadgirl
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top