[ad_1]
VBA Applications – How to Secure the Code in Your Access Database
There are many reasons to secure your Visual Basic for Applications (VBA) code in your Access database. If you are a beginning developer and implemented a program for someone, you probably have already found out that after a period of time it was changed or even no longer works.
Users often have the bad habit to try to discover the secrets of your program or they try to adapt it to their needs.
So a few reasons to protect your code could be:
- Although not every user has bad intentions, you may wish to prevent persons who are inexperienced with the code, from changing it and introducing errors.
- You spend a lot of time and effort in writing your code so you may wish to hide your intellectual property by preventing that anyone can see it.
- The program you made is usually based on an analysis of the business rules. You may want to ensure that your application stays consistent by preventing that someone makes unauthorized changes, which conflicts with these rules.
- Of course, there is always the problem of hackers and users with bad intentions who will try to sabotage your application.
There are various methods to secure your database and the simplest one is transforming (compiling) your Access MDB file into an MDE file.
When you make an MDE file, all your code is compiled and removed from viewing. This process also compacts the database, which makes it much smaller. It also optimizes the code and provides faster execution.
How do you compile an MDE file?
When your application is finished and ready to be installed, from the Access menu bar choose Database Tools. Then click “Make MDE”. In the Save As windows, give the file a proper name and select a folder to store your file. Finally, click the Save button and your application is now secured in this file.
It is good practice to implement some level of security to your database. An MDE will protect the code and prevent users from making changes to the application intentionally or accidentally.
Keep in mind however, that an MDE file does not protect the data. You have to encode the data to prevent manipulation.
[ad_2]
Source by Tom Vanhasselt