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
Share:
6,398

Related videos on Youtube

MAW74656
Author by

MAW74656

Updated on September 18, 2022

Comments

  • MAW74656
    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
    MAW74656 over 11 years
    Where should I put this code? In autoexec?
  • SeanC
    SeanC over 11 years
    it can be put into autoexec, or as a separate piece of code that can be run at anytime.