Access ignoring default printer settings
6,398
you need to set the .UseDefaultPrinter
property of the report to True
.
From here, this code will reset the printer of all reports to default:
For Each obj In CurrentProject.AllReports
DoCmd.OpenReport ReportName:=obj.Name, View:=acViewDesign
If Not Reports(obj.Name).UseDefaultPrinter Then
Reports(obj.Name).UseDefaultPrinter = True
DoCmd.Save ObjectType:=acReport, ObjectName:=obj.Name
End If
DoCmd.Close
Next obj
Related videos on Youtube
Author by
MAW74656
Updated on September 18, 2022Comments
-
MAW74656 over 1 year
I have several Access programs, they're fairly complex, lots of VBA in them and dozens of reports, linked tables, etc. When I print these reports, they don't respect my default printer settings (namely, the duplex option). How can I correct this?
-
MAW74656 over 11 yearsWhere should I put this code? In autoexec?
-
SeanC over 11 yearsit can be put into autoexec, or as a separate piece of code that can be run at anytime.