add

Tuesday, February 2, 2010

Microsoft Access was unable to create the .accde, .mde or .ade file

Problem

Many times we have faced issue that after creating the MDB file, when we try to compile the database to MDE file ,Access gives the following error :

Microsoft Access was unable to create the .accde, .mde or .ade file

On clicking the button 'Show Help', it shows following error message:

This error is usually associated with compiling a large database into an MDE file.  Because of the method used to compile the database, a considerable number of TableID references are created for each table.  The Access database engine can only create a maximum of 2048 open TableIDs at one time.  Exporting a database as an MDE potentially can exceed this limit if the database has a large number of objects (table, macro, form, report, etc).
There is no accurate method to estimate the number of TableIDs the Access database engine uses during the process of compiling a database as an MDE.  However, each VBA module and each form uses one TableID, as a result, if the database has 500 forms, and each form's HasModule property is set to Yes, as many as 1,000 TableIDs are used.


Solution:

The main reason of database not getting compiled to mde is that it failed during compilation. That is , yiu have some code tha failed to compile.

Steps:

1. Press Alt + F11 to display VBA editor.
2. In the menu 'Debug' , you will find 1st menu item as 'Compile AccessDb'.
3. Click that option.
4. If there is no error, the database will get compiled.
5. If during compilation, any error is encountered, the VBA editor will display that error and you can rectify that.
6. Once all errors get rectified, you will be able to compile the database.


Once successfully compiled, try making the mde again ans it will definitely make the mde file.