(877) 519-4537 info@arkware.com

To get maximum performance from your Microsoft Access database, it’s important to know how to use all of the features. And one of them that you may or may not be familiar with is Compile on Demand. Even though compiling doesn’t make your code execute any faster, it can still help your data load faster, saving you time. 

In this post, we will cover what compilation is, what it means for your database to be in a compiled state and when to perform compilation. 

What is Compilation? 

Microsoft Access has two types of code – code that you write and code that Access understands and executes. VBA stands for Visual Basic for Applications, and it’s the programming language for Access, Excel and other Microsoft Office programs. 

VBA is similar to English – it’s plain text written in English so that humans can understand it. Compiling your database translates the text into something the computer can understand more easily. Access doesn’t always do this on its own – it only compiles what it needs. Sometimes, pieces can be corrupted.

The purpose of compiling your database is to make sure that there are no errors in your VBA code. 

How to Compile Your Access Database 

Let’s say that you’ve built your Access database and everything seems to be working fine – most of the time. However, from time to time, you get random messages that say something is wrong with your database, or your database crashes. If the Compact and Repair tool doesn’t help, then you might have something going on within your database. 

The first step is to compile your database. To do this, go into your Visual Basic Editor and click on Debug and then the name of your database. The compiler should point out problems with your VBA. Next, try making your ACCDE file again, a read-only, compressed version of Access. If this step is completed successfully, then your VBA should be fine. 

Decompiling Your Database 

If you’re still having problems with your database after compiling, you can try decompiling it. This is a little more involved, however. You’ll have to close down Access and type in a command prompt that you can find in this video

Once you enter in the command prompt, press Enter and Access will convert the code into a raw database format. Then recompile the database and try to make your ACCDE file. If it still doesn’t work, you have a deeper problem going on with your code, such as something spelled wrong or copied/pasted wrong.

Need Help Troubleshooting Your Database? Contact Arkware. 

It’s normal for code to get messed up. The key is to be aware when something is wrong and know the proper fixes. If you’re not sure how to troubleshoot the problems you’re having with your database, contact the database experts at Arkware. We can help with all of your database needs, including issues with your code. We provide fast, affordable service that will keep your business running efficiently!