O'Reilly logo

Access 2010: The Missing Manual by Matthew MacDonald

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 to stay away from ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required