View Full Version : Email notification of an update to a record?


eyost
06-07-2001, 08:14 AM
Hi all,

I have a database that I would like to incorporate the ability to automatically send me the current record via email once a particular field has been changed. For example, I have a field named DateFinished. I would like to have it automatically email me the record when a date has been entered in that particular field.

Any ideas?

Ed

D-Fresh
06-07-2001, 08:27 AM
Just add a procedure on the After Update event of the field and use this code..

strEmail = "Your E-Mail"
DoCmd.SendObject , , , strEmail, , , "Update", me("Record_No") & " has been updated."

Hope this helps..

Doug

eyost
06-07-2001, 10:18 AM
Excellent. The code worked; brought up a new message in Outlook with the email address and the subject entered. However, how can you tell Outlook to send that message with _no_ user interaction?

Thanks much for the help,

Ed

D-Fresh
06-07-2001, 11:29 AM
DoCmd.SendObject , , , strEmail, , , "Update", me("Record_No") & " has been updated.",True

Add the true at the end, then that should do it.

Doug

charityg
06-07-2001, 11:31 AM
set the edit message parameter to false

Like
DoCmd.SendObject , , , stremail, , "Update", strMessage, False