Share via


Form.PivotTableChange Event (Access)

Occurs whenever the specified PivotTable view field, field set, or total is added or deleted.

Syntax

expression .PivotTableChange(Reason)

expression A variable that represents a Form object.

Parameters

Name

Required/Optional

Data Type

Description

Reason

Required

Long

A PivotTableReasonEnum constant that indicates how the PivotTable list changed.

Example

The following example demonstrates the syntax for a subroutine that traps the PivotTableChange event.

Private Sub Form_PivotTableChange(Reason As Long) 
 Select Case Reason 
 Case OWC.plPivotTableReasonTotalAdded 
 MsgBox "A total was added!" 
 Case OWC.plPivotTableReasonFieldSetAdded 
 MsgBox "A field set was added!" 
 Case OWC.plPivotTableReasonFieldAdded 
 MsgBox "A field was added!" 
 End Select 
End Sub

See Also

Concepts

Form Object Members

Form Object