View Full Version : automatic e-mails


JHENDRYX
08-12-2002, 01:42 PM
Is there a way to set up an Access query, form, or report to trigger at automatic e-mail message to a predefined list of recipients? What I am trying to do is send out automatic e-mails when certain information is entered into the database. :confused:

Nero
08-13-2002, 06:19 AM
You can do this using Send Object or by writing your own code.
Use this in the 'after update' event.
ie
If Me.Fieldname = "Your Test" Then
DoCmd.SendObject acSendNoObject, , , MailNames, , , "Your Subject", "Your Text Body", 0
Else
Exit Sub
End If

JHENDRYX
08-13-2002, 08:55 AM
Will this send out a message for just this one entry or does it then send out a report for all entries. what I need the automatic e-mail to do is...When a PO number is entered into the database, I need it to trigure an e-mail that would read something like...The PO was received for (a certain job number). Will this code accomplish this?

Nero
08-13-2002, 09:10 AM
The send object is the easy option I think.
I prefer to use code expecially if I want to send attachments or referencing field values.
If you want to send me your database I will have a look and see if I can help you in any way.
It might be easier than trying to post code on the forum.

UniqueTII
08-15-2002, 01:10 PM
Here is a thread about the same issue that I answered myself. Hope this helps: http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=30870