Print Preview Macro

NSTLouis

Registered User.
Local time
Today, 07:25
Joined
Feb 9, 2001
Messages
11
I have a query which powers a form and a report. The query has a parameter requiring the user to enter [fieldname]. I want to put a command or macro button on the form which takes them straight to a print preview of the report, but I don't want them to have to enter the [fieldname] again - which is what happens with a OpenReport macro. I tried putting a "where condition" in the OpenReport Macro of [fieldname]=Forms![formname]![fieldname] but that did not work.
 
Instead of using a parameter for the query, why don't you set a text box on the form that you are originally using and then refer to that text box in the query's criteria. Then, you can have the print preview button on the form, it will open the report and the query will already have the information that was on the form.

If you need more help with this, go ahead and email me. I use these type of things ALL the time (and with more complexity).

BL
accessbob@hotmail.com
 

Users who are viewing this thread

Back
Top Bottom