Print Preview Button

tbeegz

Registered User.
Local time
Today, 05:28
Joined
Mar 28, 2002
Messages
10
How do I put a print preview button on a form?
 
What do you want to preview? a form printout or a report?
 
I want to preview the form printout.
 
Forms aren't designed to be printed. Design a report that mimics the shape of your form, and pass the specific ID of the record you want to the report from a button on your form.

Something like
Code:
DoCmd.OpenReport "FormReport", acViewPreview, , "[ID_Field] = " & Me.[ID_Field_Control]

on a button on your form will open the report in preview mode. Note that this presumes your id field is numeric. If it's text, add single quotes like so:
Code:
"[ID_Field] = '" & Me.[ID_Field_Control] & "'"
HTH,
David R


[This message has been edited by David R (edited 04-02-2002).]
 
Thanks for the tips. I generated reports similar to my forms and made buttons on the forms to print them out. Actually, they look better than the printed forms anyway. Thanks again.
 

Users who are viewing this thread

Back
Top Bottom