G
Guest
I have a command button set up to print a report. The cmd button is attached
to the following code:
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim byteCriteria As String
strReportName = "SvrReq Work Order"
strCriteria = "[Request_Tracking_ID]=" & Me![Request_Tracking_ID]
' DoCmd.OpenReport strReportName, acViewPreview, , byteCriteria
DoCmd.OpenReport strReportName, acViewPrint, , byteCriteria
End Sub
The report SvrReq Work Order is based on a parameter query. When you click
the button and get the input box and input your data and click ok the report
prints but I keep getting the "Microsoft Access has encountered a problem and
needs to close....blah, blah, blah" I can't figure out why it keeps doing
this. Any suggestions?
to the following code:
Private Sub cmdPrintRecord_Click()
Dim strReportName As String
Dim byteCriteria As String
strReportName = "SvrReq Work Order"
strCriteria = "[Request_Tracking_ID]=" & Me![Request_Tracking_ID]
' DoCmd.OpenReport strReportName, acViewPreview, , byteCriteria
DoCmd.OpenReport strReportName, acViewPrint, , byteCriteria
End Sub
The report SvrReq Work Order is based on a parameter query. When you click
the button and get the input box and input your data and click ok the report
prints but I keep getting the "Microsoft Access has encountered a problem and
needs to close....blah, blah, blah" I can't figure out why it keeps doing
this. Any suggestions?