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!

Printing Reports. 1

Status
Not open for further replies.

kpryan

Technical User
Aug 24, 2005
282
US
Hi all,
I use the code below to preview a report;
DoCmd.DoMenuItem acFormBar, acRecordsMenu, 5, , acMenuVer70
DoCmd.DoMenuItem acFormBar, acRecordsMenu, acSaveRecord, , acMenuVer70


Dim strDocName As String
Dim strWhere As String
strDocName = "Report32"
strWhere = "[RecordNo]=" & Me!RecordNo
DoCmd.OpenReport strDocName, , strWhere

This will preview the current report data to be printed.
How is the code written to just print the report without the preview.

Many thanks,

Ken
 
How are ya kpryan . . .

Code:
[blue]DoCmd.OpenReport strDocName, [purple][b]acViewNormal[/b][/purple], strWhere[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Many thanks Aceman1,
Works fine, but when it prints it wants to microsoft error closes the database?
Do you have any ideas.

Ken
 
kpryan . . .

Code:
[blue]DoCmd.OpenReport strDocName, , [purple][b],[/b][/purple] strWhere[/blue]

Calvin.gif
See Ya! . . . . . .

Be sure to see thread181-473997
Also faq181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top