Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

code to allow user to select a printer when printing a report

Status
Not open for further replies.

Tessadear

Technical User
Mar 7, 2006
26
BB
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
 
How about:
Using the Print window
thread703-1308507
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top