How does one decompile and recompile a database application?

To Decompile an Access database you’ll need to create a shortcut with the following elements:

  1. Path to the MS Access Executable (MSACESS.exe)
  2. Path to the database you would like to decompile
  3. The /decompile flag

All together, then, the shortcut would look something like the following:

"C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" "C:\users\tim\documents\Mydatabase.mdb" /decompile

Obviously, the paths will be different on your system.

I’d recommend making a backup of your database before running this command.

If you have any startup code in your database you should hold down the shift key to bypass the startup code execution.

Once the database opens, you can compact and repair the database to ensure optimal performance.

After the compact and repair, you can recompile the VBA code by opening any module and using the Debug Compile [DatabaseName] command.

If this is something you want to do frequently, you can create an “Access Decompile” shortcut in your SendTo Menu. Once you have this shortcut in the SendTo Menu you’ll be able to right-click on any Access database and select “Send To –> Access Decompile”, which is much easier than having to create a shortcut to the specific database.

Follow these steps to customize the Send To menu with an Access Decompile shortcut

  1. Create a shortcut to the Access executable.

  2. Append the /decompile flag in the Target for the shortcut. The shortcut will look like this:

    "C:\Program Files\Microsoft Office\Office\MSACCESS.EXE" /decompile

  3. Open Windows Explorer and paste the following into the address bar:


  4. Copy the shortcut you created into the SendTo Folder.

  5. The Access Decompile Shortcut will now be available for use.

To invoke the Access Decompile shortcut, right click on an Access Database in Windows Explorer and select “Send To –> Access Decompile”. Be sure to hold the shift key down to bypass any startup code in the database.

Leave a Comment