passing criteria Query from REPORT to Print Preview

Trodelphin

Registered User.
Local time
Today, 07:54
Joined
Nov 13, 2010
Messages
42
I have a Report that is generated from a querie with the usual criteria Between [StartDate]and[EndDate] which works fine but when i choose to print preview it asks for the Criteria again i figured a way around it with a button macro to blind print but as you prob have experienced Report view data can look different to Printed Data from time to time so to be able to go from Report view to Print Preview mode without repeating Critera would be great.
Cheers
 
I have a form that does the same thing, I enter 2 dates and then I have two seperate buttons, one to view print preview and one to print the report.

Below is the code for the preview report button;
Private Sub Command9_Click()
On Error GoTo Err_Command9_Click
Dim stDocName As String
stDocName = "reportName" 'ADD REPORT NAME HERE
DoCmd.OpenReport stDocName, acPreview
Exit_Command9_Click:
Exit Sub
Err_Command9_Click:
MsgBox Err.Description
Resume Exit_Command9_Click

End Sub

For printing the report I have another button that links to a macro, on-click. The macro is simply called printFigs and has the command PrintOut.

These work for me, hopefully that's some help for you :)
 

Users who are viewing this thread

Back
Top Bottom