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 gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

PrintOut and Dialog Box

Status
Not open for further replies.

mmatsumura

Technical User
Nov 21, 2001
40
US
Hi all,

Posting this to ask if anyone knows a way to perform the PrintOut action without having the Print dialog box appear. I've looked through Access Help Topics and one book, but cannot seem to get that darn thing to quit showing up.

The DoCmd.PrintOut ,,,,, works great except that it prints exactly what I have on the screen at that time rather than what is created by launching the report.

Any assistance would be greatly appreciated!


MMM

Ps If this all sound foolish it's due to my just learning - really!
 
Dear mmatsumura,

This is the code I use for printing out an invoice where the HireJobID (the primary key) is the same as that on the form I am printing from.
Code:
Private Sub cmdPrintHireInvoice_Click()
Me.Refresh
Dim strRptName As String
Dim strWhere As String
    strRptName = "HireInvoice"
    strWhere = "[HireJobID]=" & Me!HireJobID
    DoCmd.OpenReport strRptName, acPrintAll, , strWhere

End Sub
Obviously you will have to replace my report and field names with your own.
Good luck and I have to admit I got this code from someone here so, thank you whoever it was.
Regards Jim
;-)

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top