20.4. Summary

Microsoft has taken security seriously. As a result they've created some nuisances for us to deal with; however, the nuisances aren't that difficult. Jet 4.0 Service Pack 8 helps protect us from malicious attacks on our computer by blocking some functions from SQL queries. Since the Sandbox mode doesn't affect VBA, you can get 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.

We can set our macro security level to protect us from malicious databases. While the macro security warning is kind of a misnomer-since the warnings can come from an empty database—it gives us the ability to protect our users and ourselves. And because of the power of Access and its increasing widespread usage, this added protection is a good thing.

And there are a variety of ways we can get around the security warnings, including using Visual Basic scripts to start our databases or digitally signing the databases we publish. Yes, all this means more effort. But what price do you put on security? Or, think of this as a small price to pay for some very effective insurance.

Get Access 2003 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.