Form.ViewChange event (Access)
Occurs whenever the specified PivotChart view or PivotTable view is redrawn.
expression A variable that represents a Form object.
|Reason||Required||Long||A PivotViewReasonEnum constant that indicates how the view was changed. Reason always returns 1 for PivotChart views.|
The following example demonstrates the syntax for a subroutine that traps the ViewChange event.
Private Sub Form_ViewChange(ByVal Reason As Long) If Reason = OWC.plViewReasonShowDetails Then MsgBox "You've opted to show details." End If End Sub
Support and feedback
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.