Current Event

Applies To

Form.

Description

The Current event occurs when the focus moves to a record, making it the current record, or when the form is requeried.

Remarks

This event occurs both when a form is opened and whenever the focus leaves one record and moves to another. Microsoft Access runs the Current macro or event procedure before the first or next record is displayed.

By running a macro or executing an event procedure when a form’s Current event occurs, you can display a message or synchronize records in another form related to the current record. For example, when a customer record becomes current, you can display the customer’s previous order. When a supplier record becomes current, you can display the products manufactured by the supplier in a Suppliers form. You can also perform calculations based on the current record or change the form in response to data in the current record.

If your macro or event procedure performs a GoToControl or GoToRecord action in response to an Open event, the Current event occurs.

The Current event also occurs when you refresh a form or requery the form’s underlying table or query — for example, when you choose Remove Filter/Sort from the Records menu or use the Requery action in a macro or the Requery method in Visual Basic code.

When you first open a form, the following events occur in this order:

Open Load Resize Activate Current

See Also

Activate, Deactivate Events; GotFocus, LostFocus Events; GoToRecord Action; Load, Unload Events; Open, Close Events.