Macros and Security
In recent years, the people at Microsoft have become paranoid about security. Theyâve clamped down in Office programs like Access in a bid to lock out evil virus writers. And although these changes make Access a safer place to be, they also make it a bit inconvenient to use certain types of macros.
Unsafe Macro Actions
Access distinguishes between two types of macros: those that are always harmless, no matter how theyâre used, and those that have the potential for abuse. The OpenTable macro is harmless. It could open a table you donât want to see, but it canât cause any real mischief. On the other hand, the PrintOut macro isnât as innocent. In the wrong hands, it could send 400 copies of your data to the printer in 80-point font. Similarly, DeleteObject could wreak real havoc in your database, and RunApplication definitely isnât safeâit could launch the latest spyware or install a computer virus.
When you create a macro, the drop-down list of actions shows only actions that are 100 percent harmless. These actions are known as safe actions. Of course, you can have valid reasons to use potentially unsafe macros. Maybe you really do want to print a report, delete an object, or run another program. In that case, you need to use potentially unsafe macro actionsâones that Access doesnât trust quite so readily.
Note
As long as youâre the one in control of your database, you know it doesnât contain devious code and other trickery. Thereâs no good reason ...
Get Access 2010: The Missing Manual 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.