R
Radhika
I have an access report that must print double- sided.
I have created a module with this code below:
Sub RestoreReportPrinter()
Dim rpt As Report
Dim prtOld As Printer
Dim prtNew As Printer
' Open the Invoice report in Print Preview.
DoCmd.OpenReport ReportName:="Single Pump Report",
View:=acViewPreview
' Initialize rpt variable.
Set rpt = Reports![Single Pump Report]
' Save the report's current printer settings
' in the prtOld variable.
Set prtOld = rpt.Printer
' Load the report's current printer settings
' into the prtNew variable.
Set prtNew = rpt.Printer
' Change the report's Orientation property.
prtNew.Duplex = acPRDPHorizontal
' Change other Printer properties, and then print
' or perform other operations here.
' If you comment out the following line of code,
' and a user interactively closes the report preview
' any changes made to properties of the report's Printer
' object are saved when the report is closed.
Set rpt.Printer = prtNew
' Close report without saving.
DoCmd.Close ObjectType:=acReport, ObjectName:="Single Pump
Report", Save:=acSaveNo
End Sub
Then, on my reports Activate Property, I call a macro, which runs this
module.
So, when I print, the report comes out in duplex.
The problem is this works out very well with my test database in my
local drive.
When I copy it over to the network,and print to my printer..it comes
out one-sided. Each and every person who is accessing this report will
need to print it to their individual printers.
Any idea on how to stop the double-sided option from becoming
unchecked when the file is on the network???
Thanks for any help in advance!
Radhika
I have created a module with this code below:
Sub RestoreReportPrinter()
Dim rpt As Report
Dim prtOld As Printer
Dim prtNew As Printer
' Open the Invoice report in Print Preview.
DoCmd.OpenReport ReportName:="Single Pump Report",
View:=acViewPreview
' Initialize rpt variable.
Set rpt = Reports![Single Pump Report]
' Save the report's current printer settings
' in the prtOld variable.
Set prtOld = rpt.Printer
' Load the report's current printer settings
' into the prtNew variable.
Set prtNew = rpt.Printer
' Change the report's Orientation property.
prtNew.Duplex = acPRDPHorizontal
' Change other Printer properties, and then print
' or perform other operations here.
' If you comment out the following line of code,
' and a user interactively closes the report preview
' any changes made to properties of the report's Printer
' object are saved when the report is closed.
Set rpt.Printer = prtNew
' Close report without saving.
DoCmd.Close ObjectType:=acReport, ObjectName:="Single Pump
Report", Save:=acSaveNo
End Sub
Then, on my reports Activate Property, I call a macro, which runs this
module.
So, when I print, the report comes out in duplex.
The problem is this works out very well with my test database in my
local drive.
When I copy it over to the network,and print to my printer..it comes
out one-sided. Each and every person who is accessing this report will
need to print it to their individual printers.
Any idea on how to stop the double-sided option from becoming
unchecked when the file is on the network???
Thanks for any help in advance!
Radhika