Email in Access

G

Guest

I have a bunch of fields on a form. This form is called travel approval
It has the travelers name, date they are leaving, where they are going and
also there travel number, and email address. I have a check box that
approves the travel. On exit I would like it to send an email, telling the
traveler that the travel has been approved. In the email message I want it
to enclude example

Pam,
Your travel to Homer on January 30, 2006 has been approved.
Have a nice trip.

I wouold like the TA Number in the subject line

Can this even be done?
 
G

Guest

I already know that part, where I am getting confussed is how to write it.
Can you help me?
 
R

Rick B

A quick search of previous posts found tons of posts that point out how to
use the command...

Private Sub Command256_Click()
DoCmd.SendObject acSendNoObject, , , To:=[Customer], Subject:=[MySubject],
MessageText:=[Notes], EditMessage:=True
End Sub






You could replace the [Notes] with what you want to put in your email.



"Dear " & [FirstName] & ": " & vbcrlf & "Your travel to " & [Destination] &
" on " & [DepartDate] & etc.



Use fields and strings to construct your remail message text.




Private Sub Command256_Click()
DoCmd.SendObject acSendNoObject, , , To:=[Customer], Subject:=[MySubject],
MessageText:="Dear " & [FirstName] & ": " & vbcrlf & "Your travel to " &
[Destination] & " on " & [DepartDate], EditMessage:=True
End Sub
 
G

Guest

DoCmd.SendObject acSendNoObject, , , To:=, Subject:=[TA Number],
MessageText:="Dear " & [First and Last Name] & ": " & vbcrlf & "Your travel
to " & [Destination] &
" on " & [Date Leave] & "has been approved.", EditMessage:=True

This is what I have, It all is red,
Email is where I have the persons email
TA Number is what I want Subject to read
First and Last Name is the Travelers name
Destination is where the are going
Date Leave is well date leave
and the I typed the rest of my message.
What did I do wrong?
Thanks for all your help.
Chey

[QUOTE="Rick B"]
A quick search of previous posts found tons of posts that point out how to
use the command...

Private Sub Command256_Click()
DoCmd.SendObject acSendNoObject, , , To:=[Customer], Subject:=[MySubject],
MessageText:=[Notes], EditMessage:=True
End Sub






You could replace the [Notes] with what you want to put in your email.



"Dear " & [FirstName] & ": " & vbcrlf & "Your travel to " & [Destination] &
" on " & [DepartDate] & etc.



Use fields and strings to construct your remail message text.




Private Sub Command256_Click()
DoCmd.SendObject acSendNoObject, , , To:=[Customer], Subject:=[MySubject],
MessageText:="Dear " & [FirstName] & ": " & vbcrlf & "Your travel to " &
[Destination] & " on " & [DepartDate], EditMessage:=True
End Sub
--
Rick B



[QUOTE="Chey"]
I already know that part, where I am getting confussed is how to write it.
Can you help me?
[/QUOTE]
[/QUOTE]
 
G

Guest

Something I forgot to ask was. I have a checkbox. When I close the form I
was this to happen for everyone that has a check box.
So I know I have to do this on the on close, but how do I intergrade the
checkbox into everything. Also, I tried to figure out myself what is wrong
with the code and I still can't figure it out.
Thanks again for all your help.

Chey said:
DoCmd.SendObject acSendNoObject, , , To:=, Subject:=[TA Number],
MessageText:="Dear " & [First and Last Name] & ": " & vbcrlf & "Your travel
to " & [Destination] &
" on " & [Date Leave] & "has been approved.", EditMessage:=True

This is what I have, It all is red,
Email is where I have the persons email
TA Number is what I want Subject to read
First and Last Name is the Travelers name
Destination is where the are going
Date Leave is well date leave
and the I typed the rest of my message.
What did I do wrong?
Thanks for all your help.
Chey

[QUOTE="Rick B"]
A quick search of previous posts found tons of posts that point out how to
use the command...

Private Sub Command256_Click()
DoCmd.SendObject acSendNoObject, , , To:=[Customer], Subject:=[MySubject],
MessageText:=[Notes], EditMessage:=True
End Sub






You could replace the [Notes] with what you want to put in your email.



"Dear " & [FirstName] & ": " & vbcrlf & "Your travel to " & [Destination] &
" on " & [DepartDate] & etc.



Use fields and strings to construct your remail message text.




Private Sub Command256_Click()
DoCmd.SendObject acSendNoObject, , , To:=[Customer], Subject:=[MySubject],
MessageText:="Dear " & [FirstName] & ": " & vbcrlf & "Your travel to " &
[Destination] & " on " & [DepartDate], EditMessage:=True
End Sub
--
Rick B



[QUOTE="Chey"]
I already know that part, where I am getting confussed is how to write it.
Can you help me?


:

Yes. Look at DoCmd.SendObject.

--
Rick B



I have a bunch of fields on a form. This form is called travel approval
It has the travelers name, date they are leaving, where they are going
and
also there travel number, and email address. I have a check box that
approves the travel. On exit I would like it to send an email, telling
the
traveler that the travel has been approved. In the email message I
want
it
to enclude example

Pam,
Your travel to Homer on January 30, 2006 has been approved.
Have a nice trip.

I wouold like the TA Number in the subject line

Can this even be done?
[/QUOTE]
[/QUOTE][/QUOTE]
 

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


Top