locked
Form - email question RRS feed

  • Question

  • 

    I am new to Access and I have created a form where each time I make a change to the form an email will be automatically generated and sent to the employee directing them to changes I have made  The problem I am having is that I can't get the information I changed to come up in the email (using update after events).

    Please start charging [hours] to [charge number] for your [task] tasking.

    There must be some coding I need to add to the above string so the hours, charge number and tasking will populate from my form/list.  I was also hoping that the email would be sent out after all changes to a particular employee has been made and not after each change I make to more than one item on the above list.


    • Edited by jeaniev Friday, October 28, 2016 7:49 PM
    Friday, October 28, 2016 7:49 PM

All replies

  • I am new to Access and I have created a form where every time I make a change to the form an email will be automatically generated and sent to the employee directing them to changes I have made.  The problem I am having is that I can't get the information I changed to come up in the email (using update after events).  The body of the email says

    Please start charging [hours] to [charge number] for [task] tasking.

    There must be some coding I need to add to the above string so the hours, charge number and tasking will pick up from my form.  I was also hoping that the email would be sent out when I have finished updating the particular employee and not after each change I make on more than one of the above items.

    
    • Merged by Bob Ding Monday, October 31, 2016 2:06 AM the same question
    Friday, October 28, 2016 3:20 PM
  • This forum is for WinForms. For Access programming visit https://social.msdn.microsoft.com/Forums/office/en-US/home?forum=accessdev


    Visual C++ MVP

    Friday, October 28, 2016 4:23 PM
  • thanks
    Friday, October 28, 2016 6:00 PM
  • So do you compose the e-mail body in code? There you can refer to the forms controls as follows:

    Body = "Please start charging" & Me![hours] & " to " & Me![charge number] & "for your " & me![task] & " tasking."

    It would be best not to use the AfterUpdate events. I would add a command button "Save and Send" that you click in order to send the e-mail.

    Matthias Kläy, Kläy Computing AG

    Saturday, October 29, 2016 1:15 AM
  • Hi jeaniev,

    Did the suggestion from Matthias work for you?

    If not, it would be helpful if you could share us how you get information and write the email. In my option, we usually bind a table to a form as database, if so, I would suggest you send email in the After Update macro for the table.

    Best Regards,

    Edward


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Monday, October 31, 2016 8:48 AM