473,387 Members | 1,859 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

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

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
4 5415
PGAC
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
The after update macro is being triggered when the table updates though, not the form.
Jun 23 '12 #3
PGAC
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
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

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

Similar topics

2
by: Tom | last post by:
It wont let me send an email from access comes up with error msg. "Microsoft Access can't open mail session" What could it be? JS
3
by: icsupt via AccessMonster.com | last post by:
I would like to send an email from Access. I copied the code from another free website, but it does not do everything I need it to do. I have a series of checkboxes: checkbox1 - when checked,...
1
by: Mr T | last post by:
I know how to send email from Access and I know how to create a custom form in Outlook. but.... How do I put the email info from Access into the Outlook custom form ??? Dim MyDB As Database Dim...
1
by: ncsthbell | last post by:
I saw a thread from last October with 'Tara99' where she apparently was trying to do exactly what I need to do, send enails from access using Groupwise. However, I did not see in the end where or if...
0
by: Ana C. Dent | last post by:
On 19 Aug 2003 06:05:33 -0700, Tracey <tracey.lemer@itsservices.comwrote: You need to conform to the SMTP "standard: To: {recipent_name_here} From: {sender} Subject: {An_example} Date:...
5
by: N2Deep | last post by:
I'm new at trying to write VBA, and have been working on this delete loop for a while, and could use some help. I want the macro to start in cell B1, if it finds the string "Contract Type" in cell...
0
by: Maric Michaud | last post by:
Le Monday 18 August 2008 12:43:02 Gabriel Genellina, vous avez écrit : escribió: Three options here : - dealing directly with outlook mailboxes files, I used some open source code to parse...
0
by: Ahmed, Shakir | last post by:
Thanks everyone who tried to help me to parse incoming email from an exchange server: Now, I am getting following error; I am not sure where I am doing wrong. I appreciate any help how to resolve...
2
by: jotr | last post by:
I recently received help writing a search macro for excel, but now I am trying to change it up to use it in another spreadsheet, and I am having some troubles. I need it to search two cells one has...
3
by: atlanteavila | last post by:
Hello all, I've got a database that is used to register couples preparing to get married in our Church to a class named Pre-Cana, we collect couples personal infomation along with email addresse,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.