D
Don
Hi,
I have a workorder form that the user enters information and then press' the
print button. Once pressed a workorder prints at a remote location and one
prints locally (using two different reports assigned to different printers).
After printing the order clears from the form and allows the user to enter
another order if needed. My problem is many times users complain that when
printing the first order, the report if blank of the entered data and only
prints the form titles. Once they enter the next workorder everything prints
the way it should. What should I be looking for? Below is the code used in
the print button:
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
Dim stDocName1 As String
stDocName1 = "WorkOrderNetPrint"
DoCmd.OpenReport stDocName1, acNormal
If IsNull(Me.PrintDate) Then
Me.DidNotPrint = "No"
CurrentDb.Execute "Update WorkOrderNetwork set
WorkOrderNetwork.[PrintDate] = Now"
'dbFailOnError
End If
End If
Me.Requery
I have a workorder form that the user enters information and then press' the
print button. Once pressed a workorder prints at a remote location and one
prints locally (using two different reports assigned to different printers).
After printing the order clears from the form and allows the user to enter
another order if needed. My problem is many times users complain that when
printing the first order, the report if blank of the entered data and only
prints the form titles. Once they enter the next workorder everything prints
the way it should. What should I be looking for? Below is the code used in
the print button:
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
Dim stDocName1 As String
stDocName1 = "WorkOrderNetPrint"
DoCmd.OpenReport stDocName1, acNormal
If IsNull(Me.PrintDate) Then
Me.DidNotPrint = "No"
CurrentDb.Execute "Update WorkOrderNetwork set
WorkOrderNetwork.[PrintDate] = Now"
'dbFailOnError
End If
End If
Me.Requery