none
Send Email to Outlook Account when an Access Form has been completed RRS feed

  • Question

  • Hi everyone

    I have a form in one of my Access DBs - Userform1.

    I want some code that sends an email to me everytme a new record has been added via the form to the Access table.

    I know that this probably involves the SendObject command and the forms Alter Event but i need a step by step guide.

    Thanks in advance.

    BO

    Tuesday, January 24, 2012 1:58 PM

Answers

  • Is your Form bound or unbound, meaning is the Form attached to a Table, or do you write code to save the content?

     

    If its bound, the content will automatically saved, unless the users "Undo" the entry.

    If its unbound you can control the moment when the content is being saved to the Table.

     

    The last option might work for you, so when you press "save" for example, you send an e-mail via the SendObject command.

     

    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Friday, January 27, 2012 6:17 AM
    Moderator

All replies

  • Hi BO,

    What kind of E-mail do you want to send? What will be the content?

     

    You need to choose an event, when you want to send the e-mail.

    Do you want this when Form closes, are there any validations necessary?

     

    For more info, on using the SendObject command, check below thread:

    http://msdn.microsoft.com/en-us/library/ff197046.aspx

     

    Hope this helps,


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Thursday, January 26, 2012 6:29 AM
    Moderator
  • Thanks for getting back to me!

    Essentially I just want to know whether new records have been added to the table - so no attachments - just a message telling me this information.

    I suppose an event when the form closes would do the job but would that fire an email regardless of whether new records were added?

     

    Thursday, January 26, 2012 2:15 PM
  • Is your Form bound or unbound, meaning is the Form attached to a Table, or do you write code to save the content?

     

    If its bound, the content will automatically saved, unless the users "Undo" the entry.

    If its unbound you can control the moment when the content is being saved to the Table.

     

    The last option might work for you, so when you press "save" for example, you send an e-mail via the SendObject command.

     

    Hope this helps,

     


    Daniel van den Berg | Washington, USA | "Anticipate the difficult by managing the easy"
    Friday, January 27, 2012 6:17 AM
    Moderator