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

Print a report from a form without getting the print prieview first

Status
Not open for further replies.

banco

Technical User
Jul 9, 2002
11
US
I have the following code in a command button which prints a report called "JOM". The button prints the current record but it shows print preview first. I would like to skip the print preview and make it print the current report right away w/o getting print prewiew. What do I add or remove from the code?

Private Sub Print_Current_Click()
Dim strDocName As String
Dim strWhere As String
strDocName = "JOM"
strWhere = "[ID]=" & Me!ID
DoCmd.OpenReport strDocName, acPreview, , strWhere

I would appriciate any help provided...
 
Change acPreview to acNormal.

You could also leave that argument blank because acNormal is the default.
 
Thank you SKO it worked...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top