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
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