Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Data Macros

So far, you’ve seen how to make a macro run when a specific event occurs in a form. However, you can also make a macro run when an event occurs in a table. This feature, which is new in Access 2010, gives you a way to make smarter tables that log changes, synchronize values, and refuse to accept bad data.

Macros that respond to table events are called data macros, and they follow different rules than the macros you’ve seen so far. Although you create data macros using the same macro designer, you’ll notice that data macros support a different set of actions. For example, data macros can’t do anything user-interface related (like show a message box or open a form), and they can’t perform risky actions (like running an application, deleting a database object, or starting a printout). In fact, pretty much the only things data macros can do are create a record, edit a record, and send an email. There’s good reason for this design—it means data macros are light, efficient, and fast.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial