Using VBA to print Duplex in Access 2007

VBABeginner

New member
Local time
Yesterday, 21:51
Joined
Jul 22, 2010
Messages
3
I posted this to another section and then noticed this on dealing with VBA so am repeating it here. I apologize for the duplication. Problem below:

---------------------------------------------------------------------

I am new to this forum, and new to VBA programming in MS Access. I am trying to print a report in duplex without getting way over my head in complicated coding and not having much success. I have tried:

DoCmd.OpenReport strReport acViewPreview
DoCmd.RunCommand acCmdPrint

which works but isn't practical as users are printing entire books consisting of many reports and the dialogue box pops up for each report. I guess it could work if anyone knows how to supress it after the first time.

Alternatively, I have tried:

DoCmd.OpenReport strReport acViewDesign, , , acHidden
Application.Printer.Duplex = acPRDPVertical
DoCmd.OpenReport strReport acViewNormal

which seems like it SHOULD work, but doesn't.

I have read until I'm bleary-eyed...does anyone have any suggestions?

Thanks so much!
 
Set your default printer to Duplex printing.
Then use this code DoCmd.OpenReport strReport acViewNormal
I have used this method when I want to print a large report on both sides to save paper etc.
 
Poppa, thank you for your response. I need a clarification though...do you mean manually set the printer to duplex (outside of the application)? Or alternatively, what is the code to set a default printer to duplex?

Thanks so much!
 
I do not have experience in changing the printer's property using code. I manually set the printer to duplex using the printer menu in Windows by selecting the printer and changing the relevant setup.
 

Users who are viewing this thread

Back
Top Bottom