Pluralsight blog Where devs, IT admins & creative pros go for news, tips, videos and more.
3,500+ tech & creative courses authored by experts - unlimited & online Get it now →
November 3, 2010

Access 2010 New Feature: Data Macros

By

One of the newest features in Access 2010 that I am excited about is the ability to create Data Macros. In previous versions of Access, if you wanted to automatically update data in a table you’d have to attach or embed a macro to a form that would then update data inside a table. Now, with Data Macros, you can attach logic directly to table and record events, a feature quite similar to SQL triggers.

What are Data Macros?

Data macros are portable, secure and scalable for a server/service environment. Data macros can even survive the trip to the web if you choose to convert your database to a web database.

Data Macros can be used for a variety of purposes. Everything from tracking when a record was last modified (something that I demonstrate how to do in my new Access 2010 Training course) or deleted to preventing blank values if a certain condition is not met.

Today we’ll take a look at the steps it takes to create data macros in Access 2010 and I’ll also show you how to paste macros into a text editor as XML.

How to Create Data Macros in Access 2010

1. Open a table to Design View and in the Table Tools Design Tab, in the Field, Record & Table Events Group, click on the button “Create Data Macros.”

Access 2010 Data Macros


2. Click on a Table Event to launch your Macro Builder.

Access 2010 Data Macros

3. Next, write your macro and save.

Access 2010 Data Macros

Note: Data macros cannot process multi-valued or attachment data-types.

Did You Know?

You can also paste macros into a text editor as XML, making it easy to edit or even share macros with others.

1. Simply open and select your macro (if selected, a gray box will appear around the actions).

Access 2010 Data Macros

2. Right-click and choose Copy.

Access 2010 Data Macros

3. Open a text editor like Notepad and paste.

Access 2010 Data Macros

Learn More about Access 2010 in Train Signal’s Access 2010 Training

About the Author

is an accomplished instructor who has taught over 4,000 students at the high school, college, and adult levels. Specializing in computer applications, writing, and literature, she holds a degree in English and Secondary Education, an Illinois Type 09 Initial Teaching Certificate, and is a Microsoft Certified Master for Office 2003. While her energetic and easy-to-follow style is ideal for beginners to computer applications, her knowledge, thoroughness, and foresight in potential problems will satisfy the more proficient user.


Discussion