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!

acCmdPrint to print multiple reports

Status
Not open for further replies.

Alruk

Technical User
Mar 16, 2004
25
GB
I have a order screen that lists completed orders ready to invoice. I have a command button that runs the below code to loop through the completed orders and print a copy of the invoice via a InvoiceOrder() sub. At the moment it uses the default printer.

I would like the user to be able to select the printer to print the invoices.

Ive tried using the DoCmd.RunCommand acCmdPrint but it just printed out a copy of the loaded form, then looped through the records and used the default printer.

If I put it in the Sub I think it will run the acCmdPrint for every record.

Any help will be much appreciated.

Part of the code is below

Code:
Dim OrderNo As Integer
While Not rst1.EOF

OrderNo = rst1.Fields![OrderID]

Call InvoiceOrder(OrderNo)

rst1.MoveNext
Wend
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top