Thursday, October 29, 2009

Microsoft Access was unable to create an MDE file

I've just come across a very (un-)informative error in Microsoft Access:

Microsoft Access was unable to create an MDE file

I'm posting this here so that if any one else comes across this error, they will know the very simple fix for it.

The error is caused by a VBA error.  The simple fix is to open up the VBA editor (Alt-F11) and choose Debug->Compile.  This should fail with a compile error, and show you where your error is.  Then you can fix your error, compile, and then save as an MDE file.