Easy-to-follow video tutorials help you learn software, creative, and business skills.Become a member
A Data Macro allows you to perform an action upon adding, updating, or deleting a record. When a customer's order is marked as complete, it would be nice to automatically send them an e-mail letting them know their olive oil has been shipped. To do this, open up the Orders table. Go up to the Table tools Ribbon and choose Table. Then click on After Update. A Macro window will open. In the first box, select If and type in a square bracket to start a field name and start typing OrderStatus.
You'll get a little dropdown with the possible matches in your database. We'll go ahead and double-click on OrderStatus, and it puts it in there. Type in = "complete". The quotation marks show that it's a text value. In the next box down, choose SendEmail. A box with parameters will open. In the To field, type in square bracket, Customers!, another square bracket, and EmailAddress and end the bracket.
The first one tells us to look in the Customers table. sSparated by the exclamation point and EmailAddress refers to the field. Now, let's set up our e-mail. In the Subject line, type in "Your Two Trees Olive Oil has been shipped." Then tab down to the Body of the message and type in "Your order has been shipped. Please let us know when it arrives and how you like it." When you are done typing, click Save and then Close. Let's test this out.
Go to the bottom of your Orders Form and click the new blank record button. It will start a new record. Tab over, pick a customer, pick a product, enter in a Quantity, then tab pass Processed to enter it in the first time. Now, let's say our order has been shipped. We'll drop down Processed and change it to Complete. When I tab off of the order, it opens up a box saying, A program is trying to send an e-mail message on our behalf. Click on Allow, and it will now send an e-mail to our customer.
Data Macros are a great way of automating tasks based on adding, updating or deleting records.
Get unlimited access to all courses for just $25/month.Become a member
82 Video lessons · 99156 Viewers
80 Video lessons · 141790 Viewers
59 Video lessons · 60158 Viewers
52 Video lessons · 73295 Viewers
Access exercise files from a button right under the course name.
Search within course videos and transcripts, and jump right to the results.
Remove icons showing you already watched videos if you want to start over.
Make the video wide, narrow, full-screen, or pop the player out of the page into its own window.
Click on text in the transcript to jump to that spot in the video. As the video plays, the relevant spot in the transcript will be highlighted.