Fix Access AutoExec RunCode Errors 2001 and 2425
Question details
Identify why an AutoExec RunCode action fails after creating an ACCDE front end or opening a split database on another computer.

- Product
- Microsoft Access
- Device & OS
- not provided
- Scenario
- An Access database uses an AutoExec macro to run a VBA function at startup, including when deployed as an ACCDE front end.
- Observed behavior
- The startup action reports errors 2001 or 2425 during conversion or on some user computers.
Confirm the exact error message, the RunCode function name, and the Access version and bitness on the development and affected computers. Keep the editable ACCDB source available, because VBA code cannot be edited in an ACCDE.
Check VBA references and test the startup function
Use the editable ACCDB to find missing dependencies, compilation errors, or a startup function Access cannot run.
Open the source ACCDB in Access and press Alt+F11. If the startup macro prevents access, hold Shift while opening the database, provided the bypass key is enabled.
In the Visual Basic Editor, select Tools > References and look for entries marked MISSING. Restore the required library or select an appropriate available reference, then click OK.
Select Debug > Compile in the VBA editor and resolve any reported errors. Repeat until the project compiles successfully.
In the Access Navigation Pane, right-click the AutoExec macro and choose Design View. Check that the RunCode expression names a public function in a standard module and supplies any required arguments.
In the VBA editor, press Ctrl+G to open the Immediate window. For a function that takes no required arguments, enter ?GetUserInfo() or the actual function name and press Enter; investigate any error or unexpected result.

Verify database trust and startup security
Check whether Access is blocking the startup code on an affected computer.
Check ACCDE and split-database compatibility
Use this check when the ACCDE works on the development computer but fails on another user's computer.
Use WPS Office for compatible document and spreadsheet work
WPS Office is a free, lightweight Office alternative with a familiar interface for working with documents, spreadsheets, and presentations. It supports common Microsoft Office formats for an easier move between applications. It does not fix Access AutoExec errors or replace an ACCDB or ACCDE database.

Frequently Asked Questions
Why does Access say it cannot find my RunCode function?
Open the AutoExec macro in Design View and check the function name and arguments in the RunCode action. The function should be public and located in a standard VBA module. Also check Tools > References in the VBA editor for missing libraries.
How can I test GetUserInfo without running AutoExec?
In the editable ACCDB, press Alt+F11 and then Ctrl+G. Enter ?GetUserInfo() in the Immediate window and press Enter if the function has no required arguments. Any error or unexpected result can help identify the cause.
Why does the ACCDE work on one computer but not another?
Compare Access versions and bitness under File > Account > About Access. Also check trusted locations, required libraries, linked-table paths, and the affected user's access to resources used by the startup function.
Can I fix the VBA code directly in an ACCDE?
No. Open the editable ACCDB source, fix and compile the VBA project, and then select Database Tools > Make ACCDE to create a new deployment file.
Should I enable all macros to fix the startup error?
Not necessarily. First check the security warning and File > Options > Trust Center > Trust Center Settings > Trusted Locations. Trust or enable content only when you trust the source and your organization's policy permits it.




