When I use the following to bring up the print dialogue, the report prints and the report closes but then everything hangs. The system line says “Formatting page: press Ctrl-Break to stop” which is useless anyway because all you can do is crash Access.
Does anyone have any bright ideas, I need to be able to select from different printers.
Private Sub Report_Activate()
On Error GoTo Err_Report_Activate
If Me.Report.HasData Then
DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, Me.Name
Else
MsgBox "No data for report", vbOkOnly
DoCmd.Close acReport, Me.Name
End If
Err_Report_Activate:
Resume Next
DoCmd.Close acReport, Me.Name
End sub
================
Does anyone have any bright ideas, I need to be able to select from different printers.
Private Sub Report_Activate()
On Error GoTo Err_Report_Activate
If Me.Report.HasData Then
DoCmd.RunCommand acCmdPrint
DoCmd.Close acReport, Me.Name
Else
MsgBox "No data for report", vbOkOnly
DoCmd.Close acReport, Me.Name
End If
Err_Report_Activate:
Resume Next
DoCmd.Close acReport, Me.Name
End sub
================