Report to a printer or preview mode?

Gkirkup

Registered User.
Local time
Yesterday, 23:56
Joined
Mar 6, 2007
Messages
628
I have a report which usually prints to a printer, but sometimes we want it to be in preview mode so that we can make a PDF and email it. I don't want to duplicate the report. Is there a way that I can programably select printer or preview mode? The report is actually a packing list used many times a day, so always having it in preview mode and manually selecting a printer is not an option.

Robert
 
I do this.

DoCmd.OpenReport "reportname", IIf(MsgBox("Preview report?", vbYesNo) = vbYes, acViewPreview, acViewNormal)

This gives user the option. Can use other criteria if prefer.
 
Variation on a theme. I use a checkbox:

Code:
 If Me.ChkPreview = True Then
        DoCmd.OpenReport ReportName, acViewPreview
Else
        DoCmd.OpenReport ReportName, acViewNormal
End If

In your case, set the checkbox default = False so the report normally prints without preview
 
Hi. Lost of options for you. You can also have separate buttons to "print," "preview," "email," or "export to PDF."
 
I have a Print - view option box in my forms

attachment.php
 

Attachments

  • 2019-04-01_8-39-13.jpg
    2019-04-01_8-39-13.jpg
    5.5 KB · Views: 181

Users who are viewing this thread

Back
Top Bottom