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
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