G
Guest
I have a form with 2 sub forms. Once data is entered a person is supposed to
press a print button and the data prints on a report. I tested this on my own
computer and the report prints correctly, so no problems there. Once the
report prints I want the user to be able to tab to a new record to continue
entries. When I try this on my own computer everything works fine. When I
copy the database to a serve,r after the print command is executed the focus
leaves the form. I can click back to the form but after data is entered it is
not being saved and the print function gives me a report with blank fields.
Here is the code for the print command. Is there additional code I can add
that will save the record and take the user to a new record?
Private Sub cmdPrintBillSummary_Click()
On Error GoTo Err_cmdPrintBillSummary_Click
Dim strDocName As String
Dim strCriteria As String
strDocName = "rptBillingSummary"
strCriteria = "[WorkOrder#]=" & Me.[WorkOrder#]
DoCmd.OpenReport strDocName, acViewNormal, , strCriteria
Exit_cmdPrintBillSummary_Click:
Exit Sub
Err_cmdPrintBillSummary_Click:
MsgBox Err.Description
Resume Exit_cmdPrintBillSummary_Click
End Sub
Thanks for the help.
press a print button and the data prints on a report. I tested this on my own
computer and the report prints correctly, so no problems there. Once the
report prints I want the user to be able to tab to a new record to continue
entries. When I try this on my own computer everything works fine. When I
copy the database to a serve,r after the print command is executed the focus
leaves the form. I can click back to the form but after data is entered it is
not being saved and the print function gives me a report with blank fields.
Here is the code for the print command. Is there additional code I can add
that will save the record and take the user to a new record?
Private Sub cmdPrintBillSummary_Click()
On Error GoTo Err_cmdPrintBillSummary_Click
Dim strDocName As String
Dim strCriteria As String
strDocName = "rptBillingSummary"
strCriteria = "[WorkOrder#]=" & Me.[WorkOrder#]
DoCmd.OpenReport strDocName, acViewNormal, , strCriteria
Exit_cmdPrintBillSummary_Click:
Exit Sub
Err_cmdPrintBillSummary_Click:
MsgBox Err.Description
Resume Exit_cmdPrintBillSummary_Click
End Sub
Thanks for the help.