Well, as usual, I published Access tips in response to problems that I come across, and get around, during my day-to-day Ms Access development.
As we know, Ms Access ain’t exactly the most stable product ever made and there are many bugs which often occur with badly explained non-sensical error messages.
Today, I kept getting an error that went something like “Cannot make MDE, ACCDE file”. This was strange. I could make the MDE about 5 minutes before I had made some minor edits to control names on a report. Why could it suddenley not make an MDE (with no real reason other than stating “Cannot make MDE”). For a few minutes, I was completely baffled.
However, as it turns out, the control name that I had innocently changed on the reports was actually used in some minor code that upon further inspection realised I didn’t need anymore. However, since Access doesn’t automatically change the VBA behind a control when you make changes to the controls properties, the new name was now inconsistent with the name used in the code…which means IT WOULDN’T COMPILE!
You see, when Access makes an MDE file, it compiles your entire database, and throws an error when it doesn’t compile (as it should) – but just doesn’t tell you specifically what the error is. So if you’re coming across the “cannot make MDE file” error, try recompiling the your Access project (and if you don’t know how to compile it, well simply jump into VBA mode and go to the DEBUG – COMPILE option on the toolbar).