I'm using the following code to send an email:
Dim SendTo As String, MySubject As String, MyMessage As String
SendTo = "myemail@myhost.com"
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
|
|
0
|
|
|
|
Reply
|
Utf
|
10/29/2007 4:29:02 PM |
|
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
"Nicole" wrote:
> I'm using the following code to send an email:
>
> Dim SendTo As String, MySubject As String, MyMessage As String
>
> SendTo = "myemail@myhost.com"
> 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
|
|
0
|
|
|
|
Reply
|
Utf
|
10/29/2007 7:46:00 PM
|
|
The field just contains a string of text. Its name is Proj Name.
"SteveM" wrote:
> 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
>
> "Nicole" wrote:
>
> > I'm using the following code to send an email:
> >
> > Dim SendTo As String, MySubject As String, MyMessage As String
> >
> > SendTo = "myemail@myhost.com"
> > 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
|
|
0
|
|
|
|
Reply
|
Utf
|
10/29/2007 7:59:02 PM
|
|
OK try this:
MyMessage = "Ref:" & Me![Proj Name] & Chr$(13) & Chr$(10) & "An MP-200
update has been provided for the project"
Steve
"Nicole" wrote:
> The field just contains a string of text. Its name is Proj Name.
>
> "SteveM" wrote:
>
> > 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
> >
> > "Nicole" wrote:
> >
> > > I'm using the following code to send an email:
> > >
> > > Dim SendTo As String, MySubject As String, MyMessage As String
> > >
> > > SendTo = "myemail@myhost.com"
> > > 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
|
|
0
|
|
|
|
Reply
|
Utf
|
10/29/2007 8:02:02 PM
|
|
Exxxxxxcellent AND WooHoo!
Worked like a dream.
"SteveM" wrote:
> OK try this:
> MyMessage = "Ref:" & Me![Proj Name] & Chr$(13) & Chr$(10) & "An MP-200
> update has been provided for the project"
>
> Steve
>
> "Nicole" wrote:
>
> > The field just contains a string of text. Its name is Proj Name.
> >
> > "SteveM" wrote:
> >
> > > 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
> > >
> > > "Nicole" wrote:
> > >
> > > > I'm using the following code to send an email:
> > > >
> > > > Dim SendTo As String, MySubject As String, MyMessage As String
> > > >
> > > > SendTo = "myemail@myhost.com"
> > > > 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
|
|
0
|
|
|
|
Reply
|
Utf
|
10/29/2007 8:41:02 PM
|
|
|
4 Replies
158 Views
(page loaded in 0.038 seconds)
|