How to Properly Decompile MS Access Database- Free Working Guide
Overview of Decompile MS Access Database Guide in Details
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, fixes corruption, and avoids strange VBA errors.
List of Key Steps to Follow While 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 for MS 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 from 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 MS Access is, first to decompile the database on the development machine and then recompile it on the user PC.
Note: make sure you have taken a 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 the Compact and Repair feature to repair the 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 the 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 MS Access-Database
1)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.
2)Now go to Access and open the database you want to decompile.
3)Open any module as per your requirement and compile it through Debug, Compile.., and then File, Save.
4)Now, again go to the database and Compact it. The location of the Compact command would be different for every Access version.
5)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, this process is quite lengthy and needs good knowledge about de-compilation, therefore, a professional tool like VikMajra MS Access Database Repair that not only repairs the corrupt MS Access database but also restores all the all database objects into a new file.