Forum Discussion
Access Error
There is an error in your VBA "somewhere". You must find it and fix it.
Start by opening the accdb with the SHIFT key held down (so-called "Shift bypass"). That bypasses any code running on the AutoExec macro when the accdb opens normally, or any code in any forms that open when the accdb opens normally.
Now, open the VBA IDE.
Make sure that EVERY module has these directives.
Next, go to Compile on the Debug menu.
This will force the VBA to compile and it will reveal the bad syntax in one or more procedures in one or more modules. Fix the syntax error(s) and recompile until the errors no longer cause compile to fail.
Save and restart.
By the way, one should ALWAYS have these two directives in EVERY module. Option explicit will save you many hours of head-scratching as you try to find syntax errors.