Others

How to Troubleshoot Microsoft Access On Current Event Errors

Elise WilliamsElise Williams Nov 2, 2026 868 views

Question details

Users encounter execution errors triggered by the On Current event in Microsoft Access forms.

How to Troubleshoot Microsoft Access On Current Event Errors
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.
Before you start

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.

Solution 1Recommended

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.

1
Open the form in Design View

Right-click the problematic form in the Navigation Pane and select 'Design View'.

2
Access the VBA Code

On the Database Tools ribbon, click 'Visual Basic' or 'View Code' to open the VBA Editor.

3
Set a Execution Breakpoint

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.

4
Trigger the Event

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.

5
Step Through the Code

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.

Debug the On Current Event Using VBA Breakpoints
Macro Troubleshooting Alternative: If your On Current event is driven by a Macro instead of VBA, open the Macro in Design View and activate the 'Single Step' feature from the ribbon to run it one action at a time.
Free Microsoft Office alternative

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. 1. Download WPS Office: Visit the official WPS Office website and click the free download button.
  2. 2. Install the Software: Run the downloaded installer file and follow the quick setup wizard.
  3. 3. Open Your Data Files: Launch WPS Spreadsheet and instantly open your existing .xlsx or .csv data files.
Fully compatible with Microsoft Excel (.xlsx, .xls) and other Office formats.Lightweight installation with ultra-fast performance for data tracking.Advanced spreadsheet tools for sorting, pivoting, and analyzing data effortlessly.Completely free to download with a familiar user interface.
microsoft office alternative - wps office

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.