D
Don
In a form, I have a print button with the code that follows. My problem is
when I press the print button the debugger runs as if I toggeled a break
point. The first line of code is highlighted and I can press f8 all the way
through the code without an error. I did not set a break point. Why is this
happening and what can I do to stop it?
Private Sub Command29_Click()
On Error GoTo Err_Command29_Click
If IsNull(Me.PrintDate) And IsNull(Me.Date) Then
MsgBox "You did not enter a Work Order. Enter a Work Order, including the
Date, then press the Submit And Print Order Button."
Cancel = True
Else
Me.Refresh
Dim stDocName As String
stDocName = "WorkOrderLocalRpt"
DoCmd.OpenReport stDocName, acNormal, , "[WorkOrderId] = " & [WorkOrderId]
Dim stDocName1 As String
stDocName1 = "WorkOrderNetPrint"
DoCmd.OpenReport stDocName1, acNormal, , "[WorkOrderId] = " &
[WorkOrderId]
If IsNull(Me.PrintDate) Then
Me.DidNotPrint = "No"
CurrentDb.Execute "Update WorkOrderNetwork set
WorkOrderNetwork.[PrintDate] = Now"
'dbFailOnError
End If
End If
Me.Requery
Exit_Command29_Click:
Exit Sub
Err_Command29_Click:
' MsgBox Err.Description
Resume Exit_Command29_Click
when I press the print button the debugger runs as if I toggeled a break
point. The first line of code is highlighted and I can press f8 all the way
through the code without an error. I did not set a break point. Why is this
happening and what can I do to stop it?
Private Sub Command29_Click()
On Error GoTo Err_Command29_Click
If IsNull(Me.PrintDate) And IsNull(Me.Date) Then
MsgBox "You did not enter a Work Order. Enter a Work Order, including the
Date, then press the Submit And Print Order Button."
Cancel = True
Else
Me.Refresh
Dim stDocName As String
stDocName = "WorkOrderLocalRpt"
DoCmd.OpenReport stDocName, acNormal, , "[WorkOrderId] = " & [WorkOrderId]
Dim stDocName1 As String
stDocName1 = "WorkOrderNetPrint"
DoCmd.OpenReport stDocName1, acNormal, , "[WorkOrderId] = " &
[WorkOrderId]
If IsNull(Me.PrintDate) Then
Me.DidNotPrint = "No"
CurrentDb.Execute "Update WorkOrderNetwork set
WorkOrderNetwork.[PrintDate] = Now"
'dbFailOnError
End If
End If
Me.Requery
Exit_Command29_Click:
Exit Sub
Err_Command29_Click:
' MsgBox Err.Description
Resume Exit_Command29_Click