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

Print Preview vs. Print

Status
Not open for further replies.

pbrown2

Technical User
Jun 23, 2003
322
0
0
US
Currently the command buttons on the forms page open its corresponding report and prints automatically. However this is causing a waste of paper due to some users not familiar with the report system. Is there a way to have the report open in preview and a pop up box appear in a few seconds asking if the user wishes to print the form?
Changing the macros to print preview have been changed but there are circumstances that exists that cause us to desire to limit the use of anything other than command buttons "Yes" / "No".

Thank you for any and all help,

PBrown
 
Unfortunately an access report does not have a timer event so I really don't know how you would accomplish a delayed pop-up box. However, you could add the pop-up message box to the On Close event of the report and then when they close it, it could ask if they want to print it or not.

Otherwise, I would put two buttons on the form. One for Print and one for Print Preview.

Hope this helps.

OnTheFly
 
FYI, it is not considered good practice to repost the same questions three times unless you've not gotten a response after several days.
If you are calling the opening of the preview version from a command button on a form, you could use this:

Private Sub Command0_Click()
DoCmd.OpenReport "Report1", acViewPreview
Dim intResponse As Integer
intResponse = MsgBox("Want to print?", vbYesNo)
If intResponse = vbYes Then
DoCmd.OpenReport "Report1", acViewNormal
Else
Exit Sub
End If
End Sub

This will give the option immediately after the preview appears. You can add a timer event if you want more of a delay.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top