【发布时间】:2018-04-29 04:50:29
【问题描述】:
我看到有一个similar question 是我的,但是给出的解决方法对我来说是不可能的。 我必须打印多达 1000 个或更多。
DoCmd.OpenReport Report, acViewReport 'Open report
DoCmd.PrintOut , , , acHigh, copys' Print report
(作为副本我已经指定了副本的数量。)
我是不是做错了什么?
还有其他方法可以打印报告吗?
感谢您的帮助。
完整代码:
Private Sub cmd_openreport_Click()
'Set Variables
Dim Report
Dim Etikette
Dim Copyes As String
Dim SQLString
Dim SQLString2
DoCmd.SetWarnings False 'Turns Off Warnings
Etikette = comb_etiketten_auswahl 'Etikette Equals the comb_etiketten_auswahl value
Report = comb_etiketten_layout 'Report equals the value in the dropdown list
Copyes = Forms!frm_Hauptmenu!comb_etiketten_auswahl.Column(1)
'If The Etiketten Dropdown is empty message to client
If Etikette <> "" Then
'Do Nothing/Continue
Else
MsgBox "Bitte wählen Sie einen Datensatz aus"
Exit Sub
End If
'If The Report Dropdown is empty message to client
If Report <> "" Then
'Do Nothing (because dropdown is mot empty)
Else
MsgBox "Bitte wählen Sie ein Etikettenlayout aus"
Exit Sub
End If
MsgBox anzahl
'If Amount of copies is less than 1 message to client
If anzahl > 0 Then
On Error GoTo Error_MayCauseAnError
DoCmd.OpenReport Report, acViewReport 'Open report
DoCmd.PrintOut , , , , Copyes
DoCmd.Close Report ' Close the Report
编辑:
这个问题无关紧要,没有目的了! 这是一个内部脚本错误!
【问题讨论】: