|
本帖最后由 JosephTan 于 2012-2-17 19:13 编辑
用Printout宏,可以连续打印
以下是我的宏转换成的代码:
Option Compare Database
Option Explicit
'------------------------------------------------------------
' PrintInvoice1
'
'------------------------------------------------------------
Function PrintInvoice1()
On Error GoTo PrintInvoice1_Err
With CodeContextObject
DoCmd.SetParameter "单号", .单号
DoCmd.OpenReport "Invoice", acViewReport, "", "", acNormal
DoCmd.PrintOut acPrintAll, , , acHigh, 2, True ‘这里就是printout宏转换出来的语句2代表打印2次
DoCmd.Close acReport, "Invoice"
End With
PrintInvoice1_Exit:
Exit Function
PrintInvoice1_Err:
MsgBox Error$
Resume PrintInvoice1_Exit
End Function
|
|