RunCommand to select printer hangs it all

micks55

Registered User.
Local time
Today, 13:26
Joined
Mar 20, 2006
Messages
120
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
================
 

Users who are viewing this thread

Back
Top Bottom