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

Combine Report Preview and Print 1

Status
Not open for further replies.

Domino2

Technical User
Jun 8, 2008
475
GB
I am trying to view and print a report from a for,

'DoCmd.OpenReport "Active Tasks", acViewPreview
Allows me to see the report but not change margins, print, etc

DoCmd.OpenReport "Active Tasks", acViewNormal
Thought this was a view selection, however went straiaght into printing

I am trying to open up a report preview which just has close and print on the dialogue.Can I do it.?
 
Not tried this, but...

In the report's on close event generate a messagebox, asking do you want a print, with yes/no buttons.
Select case the response, if vbno then exit (and close) but if vbyes then openreport acviewnormal to generate a print, then end select and close

Code should not be too arduous

HTH
T
 
That's a good idea, I never thought of that, should work okay, many thanks have a star for that.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top