Preview Report prior to Print

MrG

New member
Local time
Today, 22:09
Joined
Jul 6, 2005
Messages
7
I am trying to use a print command button on a form to offer the user the capability to preview a report, to preview a report and then print it or print the report immediately without preview.

I have use acPreview option of OpenReport using DoCMD to show the preview dialogue but I have not found a way to then go on to print the report if the user so wishes.

Here is my basic code

strDocName = "repFinal"

strSQL = "FinalReview.DevtId =" & Me.txtDevtId


DoCmd.OpenReport strDocName, acPreview, , strSQL

DoCmd.SelectObject acReport, strDocName

DoCmd.RunCommand acCmdPrint

This displays the Print selection dialogue over the preview - not so clever.

I am happy to prompt the user to confirm he wishes tp preview first but can't seem to turn preview into a select print option.

Any offers - many thanks.
 
MrG said:
This displays the Print selection dialogue over the preview - not so clever.

To have a Dialog Form over top of your preview, makes no sense, you can not view the report.

Simple solution press ctrl and P at the same time, this brings up the print Dialog, press Enter and your report prints in hard copy (on paper).
 
Thanks for the ctrl-P tip.

The situation with the report is that it is printing a form. The user may wish to view the printout as the form spans more than the viewable area of the form window - the print preview gives him a full view of the data without scrolling.

He may also then wish to go on and print the form.

I have found a way by displaying a dialogue to ask the user if he wishes to preview the report, showing the preview and when the user closes the form I re-open the report in standard print mode and print it but this is cumbersome.

If he does not wish to preview I simply print the form. But I was hoping that there was a way of displaying the print option on the preview - similar to Office preview screens.
 
Sorry Rich you misunderstood, probably because my description was a little ambiguous. I am calling a report from a form by using a command button and this is printing a report based on data associated with that form. I had hoped to preview the data before the report was printed and then print the report - my users would not know Access and therefore would not realise that ctrl-P would print the report.
 

Users who are viewing this thread

Back
Top Bottom