docmd.openreport printed report (1 Viewer)

Futures_Bright

Registered User.
Local time
Today, 15:56
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
 

MikeLeBen

Still struggling
Local time
Today, 16:56
Joined
Feb 10, 2011
Messages
187
Try

DoCmd.OpenReport "Similar Clauses", acViewReport

The default action with the openreport method is print :)
 

Futures_Bright

Registered User.
Local time
Today, 15:56
Joined
Feb 4, 2013
Messages
69
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

Top Bottom