Free Guide to Decompile MS Access Database and Recover Access Data
Whenever you modify or remove any existing VBA code, the program needs to compile the code before running. Similarly, when you delete some of the VBA code from the program, it needs to decompile, as, at times, the corresponding machine code has not removed from the Object Code. De-compilation of MS Access Database Improves the overall performance of the database, fix corruption, and avoid strange VBA errors.
Steps to decompile MS Access database
At times, an MS Access database with VBA module code suddenly starts showing odd behavior and unknown errors come up. Here is the list of error that occurs when a VBA code works incorrectly:-
- ‘The database cannot be opened because the VBA project contained in it cannot be read.’
- ‘Error accessing the file. The network connection may have been lost.’
- ‘Compile Error: Out of Memory’
Benefits of de-compilation of Access database:-
- Reduces the size of your database by reducing the Object Code size
- Improves the startup time of the database
- Eliminates unknown errors that arise due to floating Object Code
- To ensure that the database or code is clean and useful for end-users
A database should be decompiled time to time, depends on a multitude of factors like a significant change in the database, after a major Office release, or when the unexpected error occurs into the database and compact & repair doesn’t work. The most efficient way to decompile the Access database is, first decompile the database on the development machine and then only recompile on the end-user computer.
Note: make sure you have taken backup of your database before performing a decompile of your database.
Decompile MS Access database
Whenever a database gets corrupted people to resort it by creating a new database and importing all the objects into it. Undoubtedly, this process resolves the corruption issues but takes a lot of time. The same process can be done in a better way using Microsoft Access /decompile command line option.
People usually obtain Compact and Repair feature to repair Access database, but it only applies to the tables and doesn’t affect VBA code. Where the decompile command applies to the complete Access database.
When you run Access database within the decompile state and open the database, it automatically discards all the old VBA compilations except your VBA source code. Now, you need to recompile the code to get the compiled state. After successful compacting, you might get a significantly smaller database.
Steps to decompile your database:-
- On a Windows system go to Start and type ‘msaccess.exe /decompile ‘in the Run command line. Here msaccess.exe includes the complete path of the Access Database.
- Now go to Access and open the database you want to decompile.
- Open any module as per your requirement and compile it through Debug, Compile.., and then File, Save.
- Now, again go to the database and Compact it. The location of the Compact command would be different for every Access version.
- After a successful compact, the database size would be reduced, and you will probably not receive strange errors related to the VBA code.
The above-explained de-compilation process applies to Microsoft Access 2013, 2010, 2007, 2003, 2002, 2000, 97 and earlier versions.
Next time whenever your database act in a strange way, you just need to run the decompile version of Access to open your database and decompile it. However, as this process is quite lengthy and needs a good knowledge about de-compilation, therefore, a professional tool like TechSoftwareLogic MS Access Database Repair that not only repair corrupt MS Access database but also restores all the all database objects into a new file.