Others

How to Fix Access Error 2046 When DoCmd.GoToRecord Fails in Form_Load

Chanuka GeekiyanageChanuka Geekiyanage Oct 26, 2026 868 views

Question details

The user encounters Error 2046 when attempting to use DoCmd.GoToRecord in the Form_Load event to navigate to a specific record in Microsoft Access.

How to Fix Access Error 2046 When DoCmd.GoToRecord Fails in Form_Load
Product
Microsoft Access
Device & OS
not provided
Scenario
Attempting to navigate to a specific database record automatically using an InputBox and DoCmd.GoToRecord during the initial loading phase of an Access form.
Observed behavior
Microsoft Access throws Error 2046 stating that the command or action is not available now, and standard form navigation buttons stop working because the form is not yet in a navigable state.
Before you start

Before modifying your VBA code or macro settings, ensure you create a backup of your Access database file to prevent any accidental data loss or form corruption during troubleshooting.

Solution 1Recommended

Move Record Navigation to the Form_Current Event

Avoid navigating to a record directly from Form_Load before the form has finished initializing. Moving the code to a later event ensures the form is fully open and ready.

The Form_Load event fires before the form's recordset is fully populated and available. Any attempt to jump to a specific record via DoCmd.GoToRecord at this stage triggers Error 2046.

1
Open Form Design View

Right-click your Access form in the navigation pane and select 'Design View'.

2
Access the Property Sheet

Press F4 or click 'Property Sheet' on the Form Design tab. Ensure the selection type is set to 'Form'.

3
Relocate VBA Code

Go to the 'Event' tab. Remove your DoCmd.GoToRecord logic from the 'On Load' event and place it into the 'On Current' event, or use a timer delay in the 'On Open' event.

Move Record Navigation to the Form_Current Event
Form Initialization: By waiting for the form to fully load its record source, DoCmd.GoToRecord will execute successfully without locking your standard navigation buttons.
Free Microsoft Office alternative

Need a Lightweight Alternative to Microsoft Office? Try WPS Office

While Microsoft Access is powerful for complex databases, its VBA errors like Error 2046 can be frustrating. If you mostly need robust data organization, calculations, and reporting without dealing with complex coding, WPS Spreadsheet is a perfect, lightweight alternative. It offers full compatibility with Microsoft Excel formats and provides an intuitive interface for your daily data management needs.

  1. 1. Download WPS Office: Visit the official WPS website to download and install the free, lightweight suite.
  2. 2. Open WPS Spreadsheet: Launch WPS Spreadsheet to handle your tabular data, lists, and reporting without complex databases.
  3. 3. Import Your Data: Easily import your existing Excel or CSV data exports from Access and begin analyzing immediately.
Fully compatible with Microsoft Excel (.xlsx, .xls) and other Office formats.Manage and filter large datasets easily without complex VBA scripting.Lightweight installation with a highly intuitive, tabbed user interface.Free to download with comprehensive data analysis and charting tools.
microsoft office alternative - wps office

Frequently Asked Questions

Why does DoCmd.GoToRecord fail during the Form_Load event?

During the Form_Load event, the form and its underlying recordset are not yet fully initialized. Microsoft Access cannot navigate to a specific record before the form has completely finished loading its data source, triggering Error 2046.

Can I open an Access form directly to an empty new record?

Yes. You can bypass displaying existing records by setting the form's 'Data Entry' property to Yes in the Property Sheet, or by using the DoCmd.OpenForm command with the DataMode argument set to acFormAdd.

How do I hide the primary key ID in an Access navigation combo box?

When creating the combo box using the Combo Box Wizard, simply check the option to 'Hide key column'. Alternatively, you can open the Property Sheet for the combo box, go to the Format tab, and set the Column Widths property to 0" for the first column.