要判断Access窗体的打印状态,可以使用以下方法:
Me.PrintPreview
If Me.Printer.PrinterStatus = acPrinterReady Then
' 打印机准备就绪,可以打印窗体
Me.Print
End If
If Printer.PrinterStatus = acPrinterReady Then
' 打印机准备就绪,可以打印窗体
DoCmd.PrintOut
End If
请注意,上述方法仅适用于Access VBA编程。如果你是在Access表单的事件过程中进行判断,可以使用类似的代码。
辰迅云「云服务器」,即开即用、新一代英特尔至强铂金CPU、三副本存储NVMe SSD云盘,价格低至29元/月。点击查看>>
推荐阅读: access怎么设置窗体文本框功能