Disabled Mode

Disabled mode essentially means that a database will open but the VBA code and unsafe macro actions will not run. The default setting for Access 2007 is to open a database in disabled mode. Because embedded macros run in Disabled mode, the more routine commands that are included in macros, the more functionality an application has when it's opened in a non-trusted location. VBA code is disabled by default, so safe macros (those that consist only of safe macro actions) allow solutions to be deployed without worrying about signatures, certificates, and trusted locations. That means fewer hassles for e-mailing and downloading files. Of course, there will be a tradeoff in functionality. As mentioned before, unsafe macro actions are blocked in disabled mode, so disabled mode would block a macro from doing such things as running an action query, deleting an object, or interacting with the File system.

Macros can be embedded into any event handler, which means that they can be used on forms, reports, and controls. To use macros most effectively, they should be grouped and named, have error handling, go through debugging, and take advantage of temporary variables as appropriate. Chapter 2 provides examples and guidance for using macros.

Was this article helpful?

0 0

Post a comment