45
Using Macros in Reports
As you've seen in previous lessons, macros are a big part of Access databases and can be extremely easy to create. Just as with forms, using Macros in reports can provide powerful functionality, without all the complexity of having to write and maintain VBA code. This lesson discusses the basics of working with macros using the new Access 2010 Macro Designer, and how macros can be applied to reports and their controls.
LESSON SETUP
To begin working with macros in reports, you must have a report to work with in a database. Every report contains the same Events methods, so it doesn't really matter what kind of report you use, except for Web Report objects. They are somewhat different and are for use with SharePoint and Access Web Applications specifically, but for this lesson, you should use normal Access Report objects. You can easily create a new report or just use an existing one that is already in a database; it doesn't really matter for the purpose of viewing the report's events and building macros for this lesson.
MACROS IN ACCESS
The term macro in Access refers to a set of functionalities provided by Access that can be executed when the macro is called. Macro objects can have one or more of these actions that execute in sequence when the macro is called. The best part about macros is that building them is as easy as choosing items from a list, just like when using the Property Sheet.
As you already know, two types of Access Macro objects exist: Named ...
Get Microsoft® Access® 2010 24-Hour Trainer 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.