View Full Version : Solved: Access Report Printing
candie213
05-11-2010, 10:25 AM
I would like to make a access report default to print 2 copies whenever it prints. I created a POS system and would like it to print 2 receipts when a sale is complete.
CreganTur
05-11-2010, 11:06 AM
How are you telling Access to print your report currently?
candie213
05-11-2010, 12:02 PM
I created a buttom in a form to pull up the receipt(Report) to print.
CreganTur
05-12-2010, 05:13 AM
Use the DoCmd.PrintOut method to print your report- it has a parameter for Copies where you an designate the number of copies you want printed.
HTH:thumb
candie213
05-12-2010, 05:27 AM
Use the DoCmd.PrintOut method to print your report- it has a parameter for Copies where you an designate the number of copies you want printed.
HTH:thumb
Yes, I understand that is the function to do it with. I just don't know how to write the code to make it happen.
This is what I have so far and it is not working.
Private Sub cmdPrintCash_Click()
'Open report in Preview mode
DoCmd.OpenReport "CashInvoice", acViewPreview
'Print out specified number of report copies
DoCmd.PrintOut , , , , 2
End Sub
I added this code to the report. Should it be a module instead?
CreganTur
05-12-2010, 06:40 AM
That code looks correct. What happens when you click the button to run this code?
candie213
05-12-2010, 06:56 AM
That code looks correct. What happens when you click the button to run this code?
It only prints one copy.
candie, do you still need to do this?
candie213
05-24-2010, 05:38 AM
candie, do you still need to do this?
No, I got it to work. Thanks!
CreganTur
05-24-2010, 08:48 AM
Mind sharing your solution so others can benefit?
candie213
05-24-2010, 08:50 AM
Thanks for every ones help. Below is the code I used to get it to work....
Private Sub cmdPrintCash_Click()
'Open report in Preview mode
DoCmd.OpenReport "CashInvoice", acViewPreview
'Print out specified number of report copies
DoCmd.PrintOut , , , , 2
End Sub
Powered by vBulletin® Version 4.2.5 Copyright © 2024 vBulletin Solutions Inc. All rights reserved.