Microsoft Access - Password-Protect VBA Modules (Access 2000/2002/2003)
Securing your database in Access 2000 and above no longer protects your VBA modules, so you'll need to manually password-protect any code you want to prevent others from seeing. Even if you don't use user-level security, you may want to protect modules to prevent others from borrowing or accidentally changing your code. To do so:
- Press [Alt][F11] to open the VBE
- Choose Tools | <databasename> Properties from the menu bar
- Click on the Protection tab
- Select the Lock Project For Viewing check box
- In the appropriate text boxes, enter the password you want to use
- Click OK
When you later try to access the VBA code, Access will prompt you for the password.