Emailing information about a specific record

G

Guest

I'm using the following code to send an email:

Dim SendTo As String, MySubject As String, MyMessage As String

SendTo = "(e-mail address removed)"
MySubject = "Update from MP-200"
MyMessage = "An MP-200 update has been provided for the project"
DoCmd.SendObject acSendNoObject, , , SendTo, , , MySubject, MyMessage, True

In the "MyMessage" portion I want Access to tell the email which record the
message is coming from. The field name in which this information is carried
is
two words long. What code can I use in the MyMessage string that will make
this happen?

Thanks, Nicole
 
G

Guest

I assume you are doing this from a button on a form?

What does the field you want to include in your email contain?
What is the name of this field?

Steve
 
G

Guest

OK try this:
MyMessage = "Ref:" & Me![Proj Name] & Chr$(13) & Chr$(10) & "An MP-200
update has been provided for the project"

Steve
 
G

Guest

Exxxxxxcellent AND WooHoo!

Worked like a dream.

SteveM said:
OK try this:
MyMessage = "Ref:" & Me![Proj Name] & Chr$(13) & Chr$(10) & "An MP-200
update has been provided for the project"

Steve

Nicole said:
The field just contains a string of text. Its name is Proj Name.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

SendObject Email 2
How to CC in an email 9
Emailing with field name in body of email 7
Email fro FORM 4
Email Issue 1
BCC Email 3
Send email with optional message from combo box? 6
Email problem 5

Top