22.5. Summary

Microsoft takes security seriously, and as a result it's created some nuisances for you to deal with. However, the nuisances aren't difficult. Sandbox mode helps protect you from malicious attacks on your computer by blocking some functions from SQL queries and other expressions. Because sandbox mode doesn't affect VBA, you can work around these protections by defining Public functions to execute from queries where necessary. You can also use Public functions or register ActiveX controls if the properties of those controls are blocked.

You can use the Office Trust Center and Disabled mode to protect you from malicious databases. Both features provide the capability to protect your users and yourself. Because of the power of Access and its increasingly widespread usage, this added protection is a good thing.

You can work around the security warnings in a variety of ways, including trusted locations, using Visual Basic scripts to start your databases or digitally signing the databases you publish. Yes, all this means more effort. But what price do you put on security? It's really a small price to pay for some very effective insurance.

Get Access™ 2007 VBA Programmer's Reference now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.