|
3#
楼主 |
发表于 2021-12-5 14:57:41
|
只看该作者
本帖最后由 GOODWIN 于 2021-12-5 15:05 编辑
Private Sub TZ_AfterUpdate()
Dim I As Long
Dim No, Noc As Integer
Dim PP, YH As String
Dim stDocName As String
Dim rpt As Report
Dim a As String
Dim B As String
Dim rpt1 As Object
If IsNull(Me.TQ) = False And IsNull(Me.TZ) = False Then
If IsNull(Me![strPrint]) = False Then
stDocName = "PB"
DoCmd.OpenReport stDocName, acViewPreview
Set rpt = Reports(stDocName)
rpt.Printer = Printers(Me.strPrint.ListIndex)
Call NewPRINTC
PP = Me.TPM
For I = Me.TQ To Me.TZ
YH = PP & "," & Format(I, "000")
No = Len(PP)
Noc = 10 - (No Mod 10)
If Me.TQ = 1 Then
Noc = 10 / (Me.TQ + 1)
End If
B = Format(Now, "yymmddhhmmss")
Me.TM = YH & "," & B & "," & Me.T2 & "," & Me.T3 & "," & Me.TZ
a = Me.TM
Me.QRmaker3.InputData = a
Me.QRmaker3.Requery
DoCmd.OpenReport stDocName, acViewPreview, "", "", strWhere
DoCmd.OpenReport stDocName, acViewNormal, "", "", strWhere
For Each rpt1 In CurrentProject.AllReports
DoCmd.Close acReport, rpt1.Name
Next
Next
Else
MsgBox "请检查打印机", 64, "提示"
Exit Sub
End If
Else
MsgBox "请检查起止输入", 64, "提示"
Me.TQ.SetFocus
End If Me.TPM.SetFocus End If
Me.TPM.SetFocus
End Sub
正常可以的编译MDE,但是在MDE下,这个更新会报上面的错误
|
|