![ms access subforms ms access subforms](https://image.slidesharecdn.com/msaccesssubforms-100207022057-phpapp01/95/ms-access-subform-success-12-728.jpg)
Enter (for the control on the subform that the focus moved to).LostFocus (for the control on the subform that had the focus).Exit (for the control on the subform that had the focus).LostFocus (for the control on the main form).Exit (for the control on the main form).If you use the mouse to move the focus from a control on a main form to a control on a subform of that form (a control that doesn't already have the focus on the subform), the following events occur: If you move the focus to a control on a form, and that control doesn't have the focus on that form, the Exit and LostFocus events for the control that does have the focus on the form occur before the Enter and GotFocus events for the control that you moved to. The Exit event occurs only when you click another control on the form. If you select the check box on the form again to bring it to the foreground, the GotFocus event occurs, but not the Enter event (because the control had the focus when the form was last active). The Exit event doesn't occur (because the focus is moving to a different window). Only the LostFocus event occurs when you click the report. The Enter and GotFocus events occur when you select the check box. For example, suppose you select a check box on a form, and then click a report. Unlike the GotFocus and LostFocus events, the Enter and Exit events don't occur when a form receives or loses the focus. The Exit event occurs before the LostFocus event. The Enter event occurs before the GotFocus event.
#Ms access subforms how to
īecause the Enter event occurs before the focus moves to a particular control, you can use an Enter macro or event procedure to display instructions for example, you could use a macro or event procedure to display a small form or message box identifying the type of data the control typically contains, or giving instructions on how to use the control. To run a macro or event procedure when these events occur, set the OnEnter or OnExit property to the name of the macro or to. It applies only to the option group itself. This event does not apply to check boxes, option buttons, or toggle buttons in an option group.
![ms access subforms ms access subforms](http://teacherclick.com/access2003/graficos/ventana_form_subform.gif)
SyntaxĮxpression A variable that represents a SubForm object. The Enter event occurs before a control actually receives the focus from a control on the same form or report.