Sign in with Microsoft
Sign in or create an account.
Hello,
Select a different account.
You have multiple accounts
Choose the account you want to sign in with.

Suppose you want to have Access take an action either immediately before or after you add, update, or delete data in a table, you can do it by adding data macros to the table event. While working with macros can seem a bit daunting at first, here are basic steps to get you started. Also, take a look at other macros topics available at the end of this article.

Note:  Use the following steps if you are working with a desktop database.

  1. Open the table, on the Table tab, click the event to which you want to add the macro. For example, to create a data macro that runs after you delete a record from the table, click After Delete.

Note:  When an event already has a macro associated with it, its icon appears highlighted.

Add event driven data macro

Access opens the Macro Builder. If a macro was previously created for this event, Access displays the existing macro.

  1. Add the actions that you want the macro to perform.

  2. Save and close the macro.

While the Macro Builder can help you create or edit a macro, if you haven’t used macros get an overview to macros or more about working with data macros. You might also like to find out about creating user interface (UI) macros.

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

Was this information helpful?

What affected your experience?
By pressing submit, your feedback will be used to improve Microsoft products and services. Your IT admin will be able to collect this data. Privacy Statement.

Thank you for your feedback!

×