Auto Email

N

Nanette

I'm guessing that this is a programming question.

I'd like to know if it's possible to have Access automatically notify some
via email after a specific field has been updated.

Is this possible?

If yes, please explain with detail because I'm still learning VBA.
 
F

fredg

I'm guessing that this is a programming question.

I'd like to know if it's possible to have Access automatically notify some
via email after a specific field has been updated.

Is this possible?

If yes, please explain with detail because I'm still learning VBA.

On your form, code the control's AfterUpdate event:

DoCmd.SendObject acSendNoObject, , acFormatTXT,
"[email protected]", , , "Changes made", "some text here", True

Change True to False to send the email without first displaying it for
editing.
 
N

Nanette

Thanks Fredg, That sounds sooo easy!

fredg said:
On your form, code the control's AfterUpdate event:

DoCmd.SendObject acSendNoObject, , acFormatTXT,
"[email protected]", , , "Changes made", "some text here", True

Change True to False to send the email without first displaying it for
editing.
 
D

dangthanh

Hi Fredg,
I tried this code
DoCmd.SendObject acSendNoObject, , acFormatTXT,
"[email protected]", , , "Changes made", "some text here", True

Change True to False to send the email without first displaying it for
editing.
but it's still display for editing. Why?
 
F

fredg

Hi Fredg,
I tried this code
DoCmd.SendObject acSendNoObject, , acFormatTXT,
but it's still display for editing. Why?

Please copy and paste your EXACT code into a reply message so I can
see it.
 
F

fredg

DoCmd.SendObject acSendNoObject, , acFormatTXT, "[email protected]," &
"[email protected]," & "[email protected]", , "[email protected]," & "[email protected]",
"Blah blah", Text Message_
& vbNewLine & Text Message , False


You have incorrectly written the multiple email addresses.
Adapt this. It works for me.

DoCmd.SendObject acSendNoObject, , acFormatTXT, _
"[email protected],[email protected],[email protected]", _
, , "Test", "TextMessage" & vbNewLine & "More Text", False

Note how I have 3 addresses (separated by commas) in the To argument
position but the entire argument is within one set of quotes:
"[email protected],[email protected],[email protected]"

compare the above with what you had:

"[email protected]," & "[email protected]," & "[email protected]
Should have been:
"[email protected], [email protected], [email protected]"

The same applies with the cc and bc arguments.
 
D

dangthanh

Fredg,
Thank you for your help.
I tried the way you show me, but the email still stairing at me and not auto
send out.

note: we use lotus note, is that have anythign to do with?
 
Top