A quick post today to regarding a bug I’ve seen reported a few times (one thread is provided below as an example) in which a database runs fine as an accdb file, but once converted to accde the VBA will not run.
Obviously, the first thing required is to ensure the front-end file has a Trusted Location defined, but in this case, that is already done, yet the VBA code still would not run. As it turns out, the solution was to do some VBA spring cleaning and delete any and all empty procedures.
Stuff like
Private Sub Form_Load()
End Sub
needs to be purged.
So if you have any procedures you started, but never added content to, delete them all. Once your project is purged of such procedures, create a new accde and try again, it should run smoothly.
Hopefully this will help someone figure out why things aren’t working.
I often get this problem, and my experience is that I forgot to open the source code and manually running Debug -> Compile.
At times the compiler will highlight an issue, other times the process will complete and the accde file will be created and running without an issue.
Yes, I’ve experienced this behavior as well. It should not be the case, as the compiling/accde creation process is supposed to do exactly that.
I’ve found in later versions of access (atleast since 2010) that if you do a debug>compile from the menu, those code stubs are removed for you. (if they match an event).
Amazing info, this just helped me solve an issue I’ve been working around for months. Thanks Daniel!
Thank you! – I’m still speechless. – I encountered the very same problem today and there was indeed an Empty Form_Load event procedure causing this.
Thank you for the tip! Worked perfectly! 🙂
It works. I had the same issue and removed the empty sub functions and it works perfectly.
Thank you for your input.
Oh, wow…. what a stupid, stupid “feature.” Thank you so much for the tip-off, as I was having this EXACT problem!!!
The more you work with any program, and most certainly Access, the more WOW moments you will experience and you’ll often ask yourself what were they thinking to come up with this idea!
I call all this type of stuff, and much more, ‘Microsoftisms’!
thank you! I had this exact issue and this resolved my problem.