To Decompile an Access database you'll need to create a shortcut with the following elements:
- Path to the MS Access Executable (MSACESS.exe)
- Path to the database you would like to decompile
- The /decompile flag
All together, then, the shortcut would look something like the following:
"C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" "C:usersimdocumentsMydatabase.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
Create a shortcut to the Access executable.
Append the /decompile flag in the Target for the shortcut. The shortcut will look like this:
"C:Program FilesMicrosoft OfficeOfficeMSACCESS.EXE" /decompile
Open Windows Explorer and paste the following into the address bar:
%APPDATA%MicrosoftWindowsSendTo
Copy the shortcut you created into the SendTo Folder.
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.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…