docmd.openreport printed report

Futures_Bright

Registered User.
Local time
Today, 23:44
Joined
Feb 4, 2013
Messages
69
Hi all,

I've just added a button to a form to open a report (to show other similar objects - filters in the report at the moment but might change to the WHERE condition for opening this report).

The code I have for the button is simply:

Code:
DoCmd.OpenReport "Similar Clauses"

However testing this button prints the report immediately :S

I've checked the default conditions are as they should be and can't see any obvious reason for this. Can someone please suggest where to look to stop this happening otherwise my tests may kill a rainforest :P


Kind regards,

Michael
 
Try

DoCmd.OpenReport "Similar Clauses", acViewReport

The default action with the openreport method is print :)
 
Thanks, I'd just found that as you replied but it is good to know that is the only thing to look out for. I've given you a thanks on behalf of myself and the animals living in the trees you helped save!
 

Users who are viewing this thread

Back
Top Bottom