Chapter 36. Using Access Macros
IN THIS CHAPTER
Looking at the Hello World macro
Working with multiaction macros
Using macro names
Making decisions with conditions
Using temporary Variables
Understanding Embedded macros
Comparing Macros to VBA
Converting macros to modules
Macros have been a part of Access since the beginning. As Access became more of a development tool, the Visual Basic for Applications (VBA) programming language became the standard in automating database applications. Macros in previous versions of Access lacked variables and error handling, which caused many developers to abandon macros altogether. Access 2007 adds these capabilities, as well and a few others, which makes macros a better alternative to VBA than in previous versions. If it's a slow day and you don't feel like writing VBA code, or if you aren't a VBA guru but still want to customize the actions that your application executes, then building structured macros is the answer.
This chapter uses a database named
Chapter36.accdb. If you have not already copied them onto your machine from the CD, you'll need to do so now. This database contains the tables, forms, reports, and macros used in this chapter.
A macro is a tool that allows you to automate tasks in Access. It's different from Word's Macro Recorder (described in Chapter 22), which lets you record a series of actions and play them back later. Access macros let you perform defined actions ...