Part II: Programming Microsoft Access
464
Form PivotTable events
The more recent versions of Access include the ability to create pivot tables that display data in
interesting ways. Although this book does not discuss pivot tables in detail, you might encounter
pivot tables as you work with Microsoft Access. Because of the special requirements imposed by
pivot tables, Access forms include a number of events, as shown in Table 12.8.
An Access pivot table is actually a special view of a table, created by selecting PivotTable View from
the View group in the Home tab while a table is open in Datasheet view. A pivot chart is created
from a table open in Datasheet view by clicking on the PivotChart button in the Forms group on
the Create tab of the Access ribbon.
TABLE 12.8
Form PivotTable Events
Event When the Event Is Triggered
Timer When a specified time interval passes
TimerInterval When the interval is specified in milliseconds
BeforeScreenTip When a screen tip is activated
CmdEnabled When a command has become enabled in a pivot chart or pivot table
CmdChecked When a pivot chart or pivot table command has been selected
CmdBeforeExecute When a PivotChart or PivotTable command has been selected from the ribbon,
but not yet executed
CmdExecute Immediately after a pivot table or pivot chart command has been executed
DataChange When a pivot table or pivot chart’s data is changed or refreshed
DataSetChange When a new data set for the chart changes (for example, when filtered)
PivotTableChange Whenever the list field, field set, or total is added or deleted in a pivot table
SelectionChange When a user makes a new selection; cannot be canceled
ViewChange When a different PivotTable view of the current data is opened
Connect When a pivot table connects to the underlying recordset
Disconnect When a pivot table disconnects from the underlying recordset
BeforeQuery When a pivot table is about to get a new data object
Query When the pivot table receives a new data object
AfterLayout When the pivot chart has already been laid out but before any rendering is
done
BeforeRender When the pivot chart is about to paint itself on the screen (before drawing
begins)
AfterRender When the object has been rendered in the pivot chart
AfterFinalRender When all the chart objects have been rendered