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

Parameter Query Question

Status
Not open for further replies.

rl78

MIS
Sep 26, 2002
17
US
I need to create a parameter query for a report that will prompt the user to enter more than one value entry for a field. For example, it should prompt the user to enter either one or more than one application number, and then have the report display those records that match up with the application numbers that they entered. How can I create a query to prompt the user for more than one value of the same field?
 
Let users specify multiple numbers in one parameter separated by commas and then pass that parameter to an IN clause in your query, e.g.

Code:
SELECT tblTAR.TARID, tblTAR.Description
FROM tblTAR
WHERE tblTAR.TARID In ([Specify your TAR numbers here, separated by commas:]);

This will work if they just enter 1 or 1,2,3

HTH [pc2]
 
Another way would be to display a form with a listbox that has its Multiselect property set to yes. The query parameter would reference the ItemsSelected property of the listbox. I didn't try this out, but I am sure you can use either the ListIndex property or the ItemsSelected property to pass the parameter criteria to the query. I'd try ItemsSelected first.

HTH
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top