In an Access report how do I determine in a report's Vb Code whet.

M

Malcolm

In an Access report how do I determine in a report's Vb Code whether the
report view is Preview?
 
A

Allen Browne

Put some code into the report's Activate event. It fires if the report is in
opened in acViewPreview, but not if opened acViewNormal.

Typically it would involve a module-level boolean variable that you set to
True in the Activate event, and can then examine in any later event.
 
M

Malcolm

Thanks

One less sleepless night.

Malcolm

Allen Browne said:
Put some code into the report's Activate event. It fires if the report is in
opened in acViewPreview, but not if opened acViewNormal.

Typically it would involve a module-level boolean variable that you set to
True in the Activate event, and can then examine in any later event.
 
Top