Form Events (Access)
Contribute to this content Use GitHub to suggest and submit changes. See our guidelines for contributing to VBA documentation. |
This object has the following events:
Events
Name |
Description |
---|---|
The Activate event occurs when a form receives the focus and becomes the active window. |
|
The AfterDelConfirm event occurs after the user confirms the deletions and the records are actually deleted or when the deletions are canceled. |
|
Occurs after all elements in the specified PivotChart view have been rendered. |
|
The AfterInsert event occurs after a new record is added. |
|
Occurs after all charts in the specfied PivotChart view have been laid out, but before they have been rendered. |
|
Occurs after the object represented by the chartObject argument has been rendered. |
|
The AfterUpdate event occurs after changed data in a control or record is updated. |
|
Occurs when a filter is applied to a form. |
|
The BeforeDelConfirm event occurs after the user deletes to the buffer one or more records, but before Microsoft Access displays a dialog box asking the user to confirm the deletions. |
|
The BeforeInsert event occurs when the user types the first character in a new record, but before the record is actually created. |
|
Occurs when the specified PivotTable view queries its data source. |
|
Occurs before any object in the specified PivotChart view has been rendered. |
|
Occurs before a ScreenTip is displayed for an element in a PivotChart view or PivotTable view. |
|
The BeforeUpdate event occurs before changed data in a control or record is updated. |
|
The Click event occurs when the user presses and then releases a mouse button over an object. |
|
The Close event occurs when a form is closed and removed from the screen. |
|
Occurs before a specified command is executed. Use this event when you want to impose certain restrictions before a particular command is executed. |
|
Occurs when the specified Microsoft Office Web Component determines whether the specified command is checked. |
|
Occurs when the specified Microsoft Office Web Component determines whether the specified command is enabled. |
|
Occurs after the specified command is executed. Use this event when you want to execute a set of commands after a particular command is executed. |
|
Occurs when the focus moves to a record, making it the current record, or when the form is refreshed or requeried. |
|
Occurs when certain properties are changed or when certain methods are executed in the specified PivotTable view. |
|
Occurs whenever the specified PivotTable view is data-bound and the data set changes — for example, when a filter operation takes place. This event also occurs when initial data is available from the data source. |
|
The DblClick event occurs when the user presses and releases the left mouse button twice over an object within the double-click time limit of the system. |
|
The Deactivate event occurs when a form loses the focus to a Table, Query, Form, Report, Macro, or Module window, or to the Database window. |
|
Occurs when the user performs some action, such as pressing the DEL key, to delete a record, but before the record is actually deleted. |
|
The Dirty event occurs when the contents of the specified control changes. |
|
The Error event occurs when a run-time error is produced in Microsoft Access when a form has the focus. |
|
Occurs when the user opens a filter window by clicking Filter by Form, Advanced Filter/Sort, or Server Filter By Form. |
|
The GotFocus event occurs when the specified object receives the focus. |
|
The KeyDown event occurs when the user presses a key while a form or control has the focus. This event also occurs if you send a keystroke to a form or control by using the SendKeys action in a macro or the SendKeys statement in Visual Basic. |
|
The KeyPress event occurs when the user presses and releases a key or key combination that corresponds to an ANSI code while a form or control has the focus. This event also occurs if you send an ANSI keystroke to a form or control by using the SendKeys action in a macro or the SendKeys statement in Visual Basic. |
|
The KeyUp event occurs when the user releases a key while a form or control has the focus. This event also occurs if you send a keystroke to a form or control by using the SendKeys action in a macro or the SendKeys statement in Visual Basic. |
|
Occurs when a form is opened and its records are displayed. |
|
The LostFocus event occurs when the specified object loses the focus. |
|
The MouseDown event occurs when the user presses a mouse button. |
|
The MouseMove event occurs when the user moves the mouse. |
|
The MouseUp event occurs when the user releases a mouse button. |
|
Occurs when the user rolls the mouse wheel in Form View, Split Form View, Datasheet View, Layout View, PivotChart View, or PivotTable View. |
|
Occurs when the specified PivotTable view connects to a data source. |
|
Occurs when the specified PivotTable view disconnects from a data source. |
|
The Open event occurs when a form is opened, but before the first record is displayed. |
|
Occurs whenever the specified PivotTable view field, field set, or total is added or deleted. |
|
Occurs whenever the specified PivotTable view query becomes necessary. The query may not occur immediately; it may be delayed until the new data is displayed. |
|
The Resize event occurs when a form is opened and whenever the size of a form changes. |
|
Occurs whenever the user makes a new selection in a PivotChart view or PivotTable view. |
|
The Timer event occurs for a form at regular intervals as specified by the form's TimerInterval property. |
|
Occurs when the user undoes a change. |
|
The Unload event occurs after a form is closed but before it's removed from the screen. When the form is reloaded, Microsoft Access redisplays the form and reinitializes the contents of all its controls. |
|
Occurs whenever the specified PivotChart view or PivotTable view is redrawn. |