By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,647 Members | 1,444 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,647 IT Pros & Developers. It's quick & easy.

Automatically send email using DoCmd.SendObject

iBasho
P: 16
Hi,
I am trying to set up a notification email that would come to my email everytime users click on a command button in a form. I am using the DoCmd.SendObject command without actually sending any database objects.

Expand|Select|Wrap|Line Numbers
  1. Private Sub Command107_Click()
  2. On Error GoTo Err_Command107_Click
  3.  
  4. DoCmd.SendObject acSendNoObject, , , "email@email.com", , , "Test", "Email Test", , True     
  5.  
  6. Exit_Command107_Click:
  7.     Exit Sub
  8.  
  9. Err_Command107_Click:
  10.     MsgBox Err.Description
  11.     Resume Exit_Command107_Click
  12.  
  13. End Sub
I don't want the users to have to actually click on the "Send" button of the email that pops out on the screen. Is there any way to modify this code, or use other code so that the email window doesn't pop up, but the email is sent automatically without the user seeing it.

Thanks.
i.b.
Jul 29 '08 #1
Share this Question
Share on Google+
2 Replies


P: 78
Should be set to FALSE....The last statement. That will auto send without asking for changes.
Jul 29 '08 #2

iBasho
P: 16
I had it set to False and the email window still popped up and you had to press enter for the email to be sent.
Jul 29 '08 #3

Post your reply

Sign in to post your reply or Sign up for a free account.