Send an E-mail when date entered

D

Daniel P

Hello

Is it possible and how can I send an e-mail to a predetermined person when a date is entered in a specific field

For instance
The user enters a date in the "completed" field and an automated E-mail stating "Job completed" is sent the (e-mail address removed)

Thanks for the help as always

Daniel
 
C

Cheryl Fischer

Daniel,

The SendObject method should work for you. You can put the code to fire
off your email in the After Update event of the significant Date Field.
Something like the following (untested) code:

If Not IsNull([Me!Completed]) then
DoCmd.SendObject acSendNoObject, , , "(e-mail address removed)", , ,
"Subject Text", "Message Text", False
End If

The last argument (False) indicates that the email will be sent without
opening it for you to view and edit. Change this value to True if you do
want the email to be opened.

--

Cheryl Fischer, MVP Microsoft Access
Law/Sys Associates, Houston, TX


Daniel P said:
Hello,

Is it possible and how can I send an e-mail to a predetermined person when
a date is entered in a specific field.
For instance:
The user enters a date in the "completed" field and an automated E-mail
stating "Job completed" is sent the (e-mail address removed)
 
D

Daniel P

Cheryl

I just hoped you could give me one little specification. By using the DoCmd.SendObject the database will send an email using the current user's E-mail account? So if joe enters a date the e-mail will be sent using joe's e-mail account?! (do I understand correctly?

Thank you for your help on this one

Daniel
 
C

Cheryl Fischer

That's correct, Daniel. And, if Joe has more than one email account setup
in his MAPI-compliant email client, the email will be sent from the Default
account.



--

Cheryl Fischer, MVP Microsoft Access



Daniel P said:
Cheryl,

I just hoped you could give me one little specification. By using the
DoCmd.SendObject the database will send an email using the current user's
E-mail account? So if joe enters a date the e-mail will be sent using joe's
e-mail account?! (do I understand correctly?)
 
D

Daniel P

Does Outlook have to already be open for this to work or will it automatically be lauched?

Thanks,

Daniel
 

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

Top