Ms access 设置ColorMode以在VBA中打印访问报告

Ms access 设置ColorMode以在VBA中打印访问报告,ms-access,printing,vba,Ms Access,Printing,Vba,我在使用VBA设置access报告的打印属性时遇到问题。 我尝试使用 Application.Printer.PrintQuality = acPRPQHigh Application.Printer.PaperSize = acPRPSA5 Application.Printer.ColorMode = acPRCMColor 与 我测试了Application.Printer是否设置为正确的打印机,情况就是这样。 尽管如此,在打印报告时不使用这些属性 DoCmd.OpenReport "R

我在使用VBA设置access报告的打印属性时遇到问题。 我尝试使用

Application.Printer.PrintQuality = acPRPQHigh
Application.Printer.PaperSize = acPRPSA5
Application.Printer.ColorMode = acPRCMColor

我测试了Application.Printer是否设置为正确的打印机,情况就是这样。 尽管如此,在打印报告时不使用这些属性

DoCmd.OpenReport "Report"

我可以帮你吗。每个报表都有自己的打印机对象,因此您应该使用

MyReport.Printer.PrintQuality = acPRPQHigh
MyReport.Printer.PaperSize = acPRPSA5
MyReport.Printer.ColorMode = acPRCMColor
或在报告中激活:

Private Sub Report_Activate()
    Set Me.Printer = Application.Printer
End Sub
Private Sub Report_Activate()
    Set Me.Printer = Application.Printer
End Sub