How to Fix Access Error 2046 When DoCmd.GoToRecord Fails in Form_Load
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.

- 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 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.
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.
Right-click your Access form in the navigation pane and select 'Design View'.
Press F4 or click 'Property Sheet' on the Form Design tab. Ensure the selection type is set to 'Form'.
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.

Use a Searchable Combo Box Instead of InputBox
Replace the InputBox prompt with an unbound combo box generated by the Combo Box Wizard to safely find and navigate to records.
Add Database Folder to Trusted Locations
Error 2046 can occasionally be caused by Access blocking VBA actions if the database is running from an untrusted location.
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. Download WPS Office: Visit the official WPS website to download and install the free, lightweight suite.
- 2. Open WPS Spreadsheet: Launch WPS Spreadsheet to handle your tabular data, lists, and reporting without complex databases.
- 3. Import Your Data: Easily import your existing Excel or CSV data exports from Access and begin analyzing immediately.

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.




