By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
434,894 Members | 1,937 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 434,894 IT Pros & Developers. It's quick & easy.

Can you help me with a send email macro? Access 2010

P: 37
I have built an after update macro that auto orders printing plates by using the sendemail macro when the stock is set to 0 by the user. The problem is, I need to add info from a related table to the body of the email but I cannot figure out how. It works fine when its only sending info from the table itself. How can I add a field from a related table?
Jun 23 '12 #1
Share this Question
Share on Google+
4 Replies


P: 7
If you modify the form's recordsource to include the field from the related table, then add this as a field to the form you are using, you should be able to include it into your email.

In you macro, update the Body field to:

Expand|Select|Wrap|Line Numbers
  1. ="your message" & Forms!FormName!FieldName & "your message"
I have done something simliar in the past, emailing from a form used to manage contacts and used fields to populate the "To" on the email.
Jun 23 '12 #2

P: 37
The after update macro is being triggered when the table updates though, not the form.
Jun 23 '12 #3

P: 7
Why not use the EmailDatabaseObject macro command on the form's after update (just don't specify an object to send).
Jun 24 '12 #4

P: 37
I have just tried your suggestion. I used the on close macro as I may need to change the qty on up to 7 items on a single form and I don't want to send an email for each item.

The on close does not work either as it only re orders the first item on the list. Getting closer though.
Jun 24 '12 #5

Post your reply

Sign in to post your reply or Sign up for a free account.