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

Passing values from a form to a query then to a report

Status
Not open for further replies.

CFBaber

Programmer
Feb 11, 2002
6
US
I have a form with a text box that i populate by selecting multiple smallint values in a list box. The values need to be passed to a query which will then be run to populate a report.

What is the procedure for passing the array of values to the query?
 
I've used this kind of logic before and here's what I've done to make it work.

1. Have the list box populate a table. You may want to delete the data in that table first if you are going to run this report over and over again.
2. Once the values are in that table, edit your query so that the criteria is selecting from that table. eg:
Criteria:
In (select [column1] from [tableA])
3. Then the report will have the control source as this query.

A cmd button can be used to do steps 2 and 3 in succession.

Hope this helps!
Rgds,
Chris
cbuono@jikkou.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top