Microsoft KB Archive/283788

= ACC2000: &quot;Microsoft Access Was Unable to Create an MDE (or ADE) Database&quot; Error Message with a Database That You Cannot Compile =

Article ID: 283788

Article Last Modified on 6/30/2004

-

APPLIES TO


 * Microsoft Access 2000 Standard Edition

-



This article was previously published under Q283788



Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).



SYMPTOMS
When you try to save a Microsoft Access database as a MDE file, you may receive the following error message

Microsoft Access was unable to create an MDE database.

and the MDE file is not created.

When you try to save a Microsoft Access project as an ADE file, you may receive the following error message

Microsoft Access was unable to create an ADE database.

and the ADE file is not created.



CAUSE
You may receive this error message if either of the following is true:
 * There is an error in the Visual Basic for Applications code that prevents you from compiling the database or project.
 * There is a reference to an Access database (.mdb) or an Access project (.adp).



RESOLUTION
Correct any problems in the code that prevent you from compiling the database or project and remove any references to .mdb and .adp files. If you need to maintain a reference to a .mdb or .adp file, convert that file into an MDE or an ADE file, and then create a reference to the new file. You should now be able to convert the database or project to an MDE or an ADE file.



Steps to Reproduce the Behavior
 Create a new database. Press ALT+F11 to open the Visual Basic Editor. On the Insert menu, click Module.  Type the following code: Sub Generate_Compile_Error MsgBoxx &quot;This will cause an error&quot; End Sub  On the File menu, click Save .</li> Press ALT+F11 to return to Microsoft Access.</li> On the Tools menu, point to Database Utilities, and then click Make MDE File.

Note that you receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article.</li></ol>

<div class="references_section">