How to Troubleshoot Microsoft Access On Current Event Errors
Question details
Users encounter execution errors triggered by the On Current event in Microsoft Access forms.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- Opening a main form that contains subforms, or navigating between records using the built-in navigation buttons.
- Observed behavior
- An error message originates from the On Current event upon loading or navigating, despite the fact that the individual subforms function correctly when opened on their own.
Identify the exact main form or subform that triggers the issue, and ensure that your database is opened from a Trusted Location so that all VBA macros and event procedures are fully enabled for testing.
Debug the On Current Event Using VBA Breakpoints
Isolate the exact line of code causing the error by temporarily suspending execution and stepping through the VBA procedure manually.
The most effective way to identify what is failing during the On Current event is to step through the background VBA code. When a form loads with subforms, the sequence of events can cause references to evaluate before they are fully initialized.
Right-click the problematic form in the Navigation Pane and select 'Design View'.
On the Database Tools ribbon, click 'Visual Basic' or 'View Code' to open the VBA Editor.
Locate the 'Form_Current' procedure. Click in the gray margin to the left of the first executable line of code. A red dot will appear, indicating the breakpoint.
Switch back to your Access database window and change the form to 'Form View', or click the navigation buttons to trigger the On Current event.
The VBA editor will pause execution and highlight the breakpoint in yellow. Press the F8 key repeatedly to step through the code one line at a time until the error occurs, which identifies the exact failing line.

Verify the Event Property Sheet Settings
Ensure that the form's property sheet correctly references the VBA procedure instead of inadvertently containing raw code.
Looking for a Lightweight Alternative to Microsoft Office?
While Microsoft Access handles complex relational databases, a vast majority of everyday data tracking, filtering, and reporting tasks can be managed seamlessly with a powerful spreadsheet tool. WPS Office offers a free, highly compatible alternative to Microsoft Office, giving you robust data capabilities without the steep learning curve and troubleshooting overhead of VBA forms.
- 1. Download WPS Office: Visit the official WPS Office website and click the free download button.
- 2. Install the Software: Run the downloaded installer file and follow the quick setup wizard.
- 3. Open Your Data Files: Launch WPS Spreadsheet and instantly open your existing .xlsx or .csv data files.

Frequently Asked Questions
What exactly triggers the On Current event in Microsoft Access?
The On Current event fires when the focus moves to a record, making it the active record. This happens immediately when you open a form, when you use navigation buttons to move to a next or previous record, or when the form is requeried or refreshed.
Why do my subforms work flawlessly on their own but cause errors in the main form?
When a main form opens, it initiates a complex sequence of events, loading the main form and all attached subforms simultaneously. If the On Current event of a subform tries to reference a field on the main form before the main form is fully loaded, it will generate an error.
How can I temporarily disable the On Current event to verify it is the source of the error?
Open your form in Design View, access the VBA Editor, and place an apostrophe (') at the beginning of each line inside the Form_Current procedure. This 'comments out' the code, turning it green and preventing it from running. If the form opens without errors afterward, you have confirmed the issue lies within that code block.




