There are differences in the CBF model for Microsoft Access and Visual Basic. In Visual Basic, you double-click on a control or form to get to its default event. Events in Visual Basic are "hard wired" to the event procedures. You can only run an event procedure in response to an event.
Microsoft Access gets you to the default event for a control or form by the right-click shortcut menu. Choose Build Event from this menu. This will display a dialog box where you can choose between three different builders: the Macro Builder, the Code Builder, and the Expression Builder.
Once you select a builder you can then attach an event procedure, a function, or a macro to the default event. Microsoft Access allows you these three choices in what you can run in response to an event. It doesn't hard-wire event procedures as Visual Basic does.
The default events for the various controls in Microsoft Access follow. These events are defaults only for the purpose of using the Build Events shortcut. They aren't run by default.
Object |
Default Event |
Form |
Load |
Report |
Open |
Bound Object Frame |
Updated |
Unbound Object Frame |
Updated |
Graph |
Updated |
Check Box |
Click |
Command Button |
Click |
Label |
Click |
List Box |
BeforeUpdate |
Option Button |
Click |
Rectangle |
Click |
Option Group |
BeforeUpdate |
Toggle Button |
Click |
Subform |
Enter |
Text Box |
BeforeUpdate |
Combo Box |
BeforeUpdate |
Section |
Format |