使用WHERE子句打印多个报告副本,而不打开预览

时间:2018-02-22 20:28:17

标签: vba ms-access access-vba ms-access-2016

在数据表视图中,我使用doubleclick事件创建了无界txtPrintMe字段。 (因为数据表视图中不允许使用按钮)。 我添加了VBA来打印报告。

Private Sub txtPrintMe_DblClick(Cancel As Integer)
    DoCmd.OpenReport "rptOrder", acViewNormal, , "id = " & Me.txtOrderID
    DoCmd.PrintOut , , , , , 2
    DoCmd.Close acReport, "rptOrder"
End Sub

当我执行此操作时,我会打印1份报告以及我的txtPrintMe所在的表单视图。当我删除PrintOut时,我会打印出单个副本而没有任何问题。

我想做什么:我只需要打印2份报告,而无需打开预览模式。我需要尽可能高效(快速打印)这样做。

可能我想将所有副本合并到单个文档中,然后才将其作为单个文件发送到打印机。但这是可选的。

0 个答案:

没有答案