Event Properties

The key to the difference between the Microsoft Access and Visual Basic CBF models is the event property. Each object in Microsoft Access has a set of event properties that correspond to each event to which the object can respond. For example, the following table lists some of the event properties and corresponding events for a check box.

Event Property

Event

OnGotFocus

GotFocus

OnKeyDown

KeyDown

OnKeyPress

KeyPress

OnKeyUp

KeyUp

OnLostFocus

LostFocus

OnMouseDown

MouseDown

OnMouseMove

MouseMove

OnMouseUp

MouseUp


You can specify a response to an event by setting the object's corresponding event property. When an event occurs that an object can respond to, Microsoft Access uses the setting of the object's corresponding event property to determine how to respond: