Sometime first record does not print

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top