|
Public Sub Command2_Click()
On Error GoTo Err_Command2_Click
DoCmd.SetWarnings False
Dim stemp As String
Dim stemp1 As String
Dim stemp2 As String
If MsgBox("是否打印", vbYesNo) = vbYes Then
stemp1 = "INSERT INTO 品质管理表21(Lable2,Lable6,Lable20,Lable3,Lable7,Lable33,Lable9,Lable35,lable5,Lable31,Lable19,Lable11,Lable21) SELECT Lable2,Lable6,Lable20,Txt,Lable7,Lable33,Lable9,Lable35,Lable5,Lable31,Tet ,Lable11,Time() FROM 品质管理表2 "
DoCmd.RunSQL stemp1
Me.Lable20 = Mid(Me.Lable20, 1, 11) & Format(Right(Me.Lable20, 3) + 1, "000")
DoCmd.OpenReport "标签查询8", acViewPreview
DoCmd.PrintOut , 1, 1 '注意看看这个地方就好了
DoCmd.Close acReport, "标签查询8"
stemp = "DELETE * FROM 品质管理表2"
DoCmd.RunSQL stemp
Me.Requery
Me.品质管理表查询6子窗体.Form.Requery
Else
Me.Requery
Me.品质管理表查询6子窗体.Form.Requery
End If
Exit_Command2_Click:
Exit Sub
Err_Command2_Click:
MsgBox Err.Description
Resume Exit_Command2_Click
End Sub |
|