I have posted twice about problems with macros suddenly not running in Access (first post, second post). I was able to get things working each time, but had no idea why the problem(s) started or what fixed them. I think I have discovered part of the problem, but do not understand the mechanism.
After exiting Access a few times and rebooting twice, the problems the 2nd time stopped. Then I inserted a code module (but did not add any code) and the problems returned. I removed the empty code module and the problems stopped. The only statement in the otherwise empty code module was Option Compare Database. So I looked through other code modules in this project and found Option Compare Database in several places. I commented out all of them and tested most of the macros. Everything ran fine. I removed the single quote from one example and no macros would run.
My testing is not exhaustive and will likely fail every statistical test. But there appears to be a pattern here. I think I know what Option Compare Database does (based on some poking around in the MS site). But that does not seem to relate to the problems I have been having.
Any thoughts?
EDIT: I somehow misposted this to the Excel area; should be Access. I have asked a forum moderator/approver/magician to move it to the rright area.