Forum Discussion
"File not found" error (Error 53) when opening Access database
I'm getting a "File not found" (Error 53) error when trying to open an Access database (.accdb file). The error appears during the database startup process and points to a VBA subroutine declaration line:
The error message mentions "The file was not found where specified" which suggests VBA is looking for a file during project compilation, but I can't identify what file it's looking for.
Has anyone encountered this issue where the same Access file works with some SQL Server backends but fails to even open with others?
2 Replies
- Tom_van_StiphoutSteel Contributor
Hold down the Shift key when opening the database, which bypasses the AutoExec macro (if any).
Then Alt+F11 to open VBA window.Tools > References to check if any are listed as Missing.
Debug > Compile to check the syntax of all VBA.Run the app again, and when the error occurs, hit Ctrl+Break to break into the debugger and look around for what code is being executed and maybe it will become apparent why a File Not Found error is being generated. If not, paste the code here, and maybe we can figure it out together.
Access VBA “File not found” (Error 53) typically arises when a required file, dynamic-link library (DLL), or external resource cannot be located. In this instance, the error occurring at a Declare statement indicates that Access is unable to load the specified library or external file during compilation, rather than an issue with the database file itself.