Previous Page

Default Events

Many types of objects in Microsoft Access are most often associated with a particular event. For example, command buttons are most commonly associated with the Click event.

To make it easier for you to program responses to these default events, the shortcut menu includes the Build Event command. When you right-click on an object, and then click Build Event, Microsoft Access displays the Choose Builder dialog box. If you click Macro Builder, Microsoft Access sets the object's default event property to the name of the macro you create. If you click Code Builder, Microsoft Access opens the Module window and displays the object's default event procedure.

Note   No event occurs for an object by default. The default event is only the event procedure that Microsoft Access displays when you click Build Event on the shortcut menu. Microsoft Access always runs the procedure associated with an object and the event that actually occurs, regardless of the object's default event.

The following table shows the default events for Microsoft Access objects that have them.

Object

Default event

Form

Load

Report

Open

Bound object frame

Updated

Unbound object frame

Updated

Image control

Click

Chart

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 (Report)

Format

Section (Form)

Click

© 1996 Microsoft Corporation. All rights reserved.

Next Page


Casa de Bender