Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automated E-mail Text

Status
Not open for further replies.

shwin

Programmer
Jun 10, 2004
15
US
--------------------------------------------------------------------------------

Hi Everyone,

I am not sure what the best forum for this would be but I have some questions regarding automatic emailing through Access 2000. I actually got it working! I currently have it set up such that it will automatically send an email everytime the record has been changed using this code on the save button:

On Error Resume Next
Dim strToWhom As String
Dim strMsgBody As String
strToWhom = DLookup("Field", "Table", "Relationship")
strMsgBody = "This is a sample email"
DoCmd.SendObject , , , strToWhom, , , "This is a test email", strMsgBody, False

For each record I am saving, I would like to include some information from the record in the email body and in the subject heading. Any suggestions would be great.

Thanks for all of your help!
 
I wrote an article for SmartAccess (by Pinnacle Publishing) a few moons ago on this very topic. The article is "Send Data Without Attachments!" by Richard A. Hunt. I'm not sure how you can get a copy of the article though?

Remember, wherever you go...there you are.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top