MS-Access / Getting Started

Sharing Data Macro Logic

The new Logic Designer in Access 2010 includes a very useful feature for sharing and reusing data macro logic. To illustrate this feature, open the tblTerminations table in Datasheet view in the Back Office Software System data copy sample web database (BOSSDataCopy.accdb). Next, click the Table contextual ribbon tab under Table Tools, and then click the After Insert button in the After Events group to open the Logic Designer. You've already explored the data macro logic attached to this table event earlier in this tutorial. Press Ctrl+A to highlight all the logic on the macro design surface and then press Ctrl+C to copy all the logic to the Windows Clipboard. Now, open Notepad or a different text editor and then press Ctrl+V to paste all the logic into Notepad.

Access copied the data macro logic from the Logic Designer as XML. You can send this XML to someone else, and that person can copy and paste the XML directly into a Logic Designer window for a data macro in his or her Access 2010 database. This feature can be especially useful if you are trying to help someone else write or debug data macro logic, such as in an Access forum or newsgroup. You can create the logic for the person you're helping and explain how you structured the program flow constructs, data blocks, and data actions.

You now have all the information that you need to modify and maintain your database table definitions.

[Previous] [Contents]