I need a user to click on a command button and print a report. My code sends the report directly to the default printer without allowing the user to select a printer.
I need the user to get the dialog box which will allow him to select a printer, before printing.
Here is my code
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim stDocName As String
stDocName = "Table1"
DoCmd.OpenReport stDocName, acNormal
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click
End Sub
I need the user to get the dialog box which will allow him to select a printer, before printing.
Here is my code
Private Sub Command1_Click()
On Error GoTo Err_Command1_Click
Dim stDocName As String
stDocName = "Table1"
DoCmd.OpenReport stDocName, acNormal
Exit_Command1_Click:
Exit Sub
Err_Command1_Click:
MsgBox Err.Description
Resume Exit_Command1_Click
End Sub