Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Determining Printed vs Previewed Report in VBA

Status
Not open for further replies.

rickj65

Programmer
Jun 5, 2002
79
0
0
US
In the On_Open Event of a Report, I have code that only applies to a report when it has been launched to be previewed (acViewPreview). However, the code creates an error when a user selects the report to be printed directly (acViewNormal).

Outside of passing a variable either globally or through MyReport.OpenArgs, is there any report property that indicates if a report has been opened for preview mode vs. opened for printing? This would essentially be the acView parameter (2nd argument) passed in the DoCmd.OpenReport method.

I could not find a corresponding property in the Locals window and I'm not certain one exists.

In the meantime, I'll probably pass the acView argument variable through OpenArgs.

Thanks,

Rick
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top