Discussion Locked

Access2K - Multi selection for printing

0 helpful
8 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Access 2000.
I have a combo box [cboInvoiceNum] on a form that gets populated based on the selection in another combo box.

There can be anywhere from 60 to 100 numeric values listed in [cboInvoiceNum].

I can select any item listed, click the print command control, and the selected value is used as the variable to run a query (DoCmd.RunSQL code), which creates the source for a report.

Here is where I need help ? I need the code to create another print command that will loop through allthe items in the [cboInvoiceNum] and run the report for each item.

Any help with a For-Next, Do-While, etc, or whatever works code would be greatly appreciated. Thanks.

8 replies

by pancras

take the rowsource select statement from the combobox and change this to a maketable query statement. This statement can then be used in a docmd.runsql to create the source table for your report

by richtee

Does not do what I want. I still need to loop through the data in the combo box. Thanks for your input.

by pancras

take the rowsource select statement from the combobox and change this to a maketable query statement. This statement can then be used in a docmd.runsql to create the source table for your report

by richtee

Additional clarification: I need to run a separate report for each value listed in the combo box - not one report with the multiple values in it. If there are 60 items in the combo box, I need to generate 60 separate reports. I need to pull the first value, run a report. Pull the second value, run a report, etc.

This discussion is closed to new replies.