Log in

View Full Version : How to get my reports to print duplex



jen7392
06-05-2014, 12:46 PM
Every day I have to print a set of 5 reports. I wanted to create a macro to print all of them at once. I used the Wizard in Access 2010 to build it. Then I had it converted to Visual Basic because I figured I would need to add the duplex part in that way. So, after it was converted, here is the code:



'------------------------------------------------------------
' PrintReports
'
'------------------------------------------------------------
Function PrintReports()
On Error GoTo PrintReports_Err


DoCmd.OpenReport "1 - Credit Card Rejected Transaction", acViewNormal, "", "", acNormal
DoCmd.OpenReport "2 - Credit Card Cleared Transactions", acViewNormal, "", "", acNormal
DoCmd.OpenReport "3 - Credit Card Outstanding Transactions (2)", acViewNormal, "", "", acNormal
DoCmd.OpenReport "4 - Honored But Not Recorded Listing", acViewNormal, "", "", acNormal
DoCmd.OpenReport "5 - eComplish Cleared Daily Total", acViewNormal, "", "", acNormal




PrintReports_Exit:
Exit Function


PrintReports_Err:
MsgBox Error$
Resume PrintReports_Exit


End Function

I have my default printer setting set to "Two-sided printing", but for some reason that does not carry through to reports in Access. When printing the reports individually, I have to go to properties and set that option. Any help I would greatly appreciate.

Thanks!!

ranman256
06-05-2014, 01:32 PM
Thats a printer property. You'd have to send the code to the printer object.

But you could, in the PC PRINTERS list, have a copy of the printer but this one is set to your duplex settings.
Print to THAT one.

see also: http://msdn.microsoft.com/en-us/library/office/ff198051(v=office.15).aspx