Combo box - Automate sending email

  • Thread starter Thread starter Mary
  • Start date Start date
M

Mary

In Access 97, I'd like to automate sending an email if the status of
"Completed" is selected from the dropdown list. The email would always go to
the same address, basically a notification that the status is complete.

Thanks,

Mary
 
I'd also like to include in the subject or message body the value in one
field on the form if possible.
 
Thanks, I got SendObject to send the email. I don't see any reference in the
urls you provided to capture the value in a field on the form. Do you know if
this is possible?
 
this should work...
DoCmd.SendObject acSendNoObject, , , "(e-mail address removed)", , , "some
subject", Forms!NameofYourForm!NameofYourControl
 
This works great, thanks!

One last question......if the user changes their mind and doesn't want to
send the email, clicking "No" at the prompt causes some error messages they
have to click out of. What error handling code can I add that will all them
to click Yes but simply quit running the code if they select No.

Thanks again,
Mary
 
I don't get any yes/no pop ups, it simply displays email ready to be sent but
you could include something like this;

Dim LResponse As Integer

LResponse = MsgBox("Do you wish to continue?", vbYesNo, "Continue")

If LResponse = vbYes Then
DoCmd.SendObject acSendNoObject, , , "(e-mail address removed)", , , "some
subject", Forms!NameofYourForm!NameofYourControl

Else
exit sub
End If


hope that helps

Amir
 
Back
Top