Chapter 12: The Access Event Model ..........................................................................................
453
Figure 12.1 shows the Property Sheet for frmProducts. This form has many event properties.
Each form section (page header, form header, detail, page footer, form footer) and every control on
the form (labels, text boxes, check boxes, and option buttons, for example) has its own set of
events.
FIGURE 12.1
The Property Sheet for frmProducts with the Events tab open.
In Figure 12.1, notice that the Property Sheet is open on the Event tab. Access forms include more
than 50 events, and each form section includes a number of events, as well as each control on the
form. As you select a form section or a control on the form, the Event tab in the Property Sheet
changes to show you the offense for that object.
In Figure 12.1, all the events with existing event procedures contain [Event Procedure],
which indicates that the property has associated VBA code that executes whenever this event is
triggered.
Creating event procedures
In Access, you execute event procedures through an object’s event properties.
Access provides event properties you use to tie VBA code to an object’s events. For example, the
On Open property is associated with a form or report opening on the screen.