Compile Access? What About Decompiling Microsoft Access Databases Too?

Compile Access? What About Decompiling Microsoft Access Databases Too?

The Compile Access VBA and the need to decompile your code can significantly reduce the file size of your Access database and also resolves corruptions (if found).

Microsoft Access stores VBA code as both source and compiled code and sometimes some of the compiled VBA code can become corrupt meaning it needs to be flushed or rinsed clean. compile access

Therefore, running Microsoft Access in a “decompile” mode causes all the compiled VBA code to be flagged as invalid which then is removed.

Once this happens and the compiled code has been removed, the database size is also significantly reduced when the database is onece again compacted.

Compile Access? What About Decompiling Microsoft Access Databases Too – How?

You will need to open your Access database using the /decompile” switch (which is not widely documented) which will discard all the old VBA Access compile code, and leave just your Access VBA source code. You will then need to re-compile the VBA code again.

To decompile your Access database, follow these steps:

  1. From the Windows, Start, Run command line (or Windows key + R), type: msaccess.exe /decompile where msaccess.exe includes the complete path of your installed Microsoft Access database application i.e.
    “C:Program FilesMicrosoft OfficeOffice14MSACCESS.EXE” /decompile


  2. When Microsoft Access opens, open the database you want to decompile making sure any trusted locations and securities are enabled (where applicable).
  3. Navigate to any module (use ALT + F11) and run the Access Compile command which is found via the Debug menu and then save your changes.
  4. Go back to the database application and carry out a new Compact and Repair Database action (which varies between versions).

Now the database file size should be reduced and any strange errors related to the Access VBA code has been resolved.

This entry was posted in Modules, MS Access, VBA and tagged , , , , . Bookmark the permalink.

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>

Confirm you are human.