Chapter 22: Using Access Macros


Getting acquainted with macros

Understanding macro security

Working with multi-action macros

Using submacros for actions that are frequently required

Making decisions with conditions

Using temporary variables

Handling errors and debugging your macros

Understanding embedded macros

Comparing macros to VBA

Macros have been a part of Access since the beginning. As Access evolved as a development tool, the Visual Basic for Applications (VBA) programming language became the standard in automating Access database applications. Macros in previous versions of Access lacked variables and error handling, which caused many developers to abandon macros altogether. Access 2013 has these capabilities (added in Access 2007), which make macros a better alternative to VBA than in previous versions. If you're creating a database to be used on the web, or if you aren't a VBA guru but you still want to customize the actions that your application executes, then building structured macros is the answer.

On the Web

This chapter uses a database named Chapter22.accdb. If you haven't already downloaded it from this book's website, you'll need to do so now. This database contains the tables, forms, reports, and macros used in this chapter.

An Introduction to Macros

A macro is a tool that allows you to automate tasks in Access. It's different from Word's Macro Recorder, which lets you record a series of actions and play them back later. (It's also different ...

Get Access 2013 Bible 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.