Results 1 to 4 of 4
  1. #1
    rayted is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2016
    Posts
    34

    Sending email notifications via outlook after update


    Hi guys,

    I am using a database template from Microsoft for tickets (helpdesk).

    Can anyone tell me how I can write a macro to send emails if there is a change (i.e. someone has updated notes?) sorry if this is a bit vague. Please tell me if I should write a seperate macro?

    Thank you!!

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    you need a variable to store the original [note] field then compare it after the record update.

    Code:
    Private mvOrigNotes
    
       'get original when user arrives on record
    sub Form_OnCurrent()
       mvOrigNotes = txtBoxNotes
    end sub
    
       'compare when user saves
    sub Form_AfterUpdate()
       if mvOrigNotes <> txtBoxNotes then
            vBody = "notes were changed on [id] = " & txtID
            docmd.SendObject acSendForm ,me.name,acFormatPDF,"bob@abc.com",,,"Notes changed",vBody
       endif
    end sub

  3. #3
    rayted is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2016
    Posts
    34
    Hi ranman256,

    What is stage for me prior to entering the code you have kindly provided me with?

    Do I click on the box in my form to be updated, property sheet, event tab?

    Sorry, still learning!

  4. #4
    June7's Avatar
    June7 is online now VIP
    Windows 10 Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,816
    You need to know how to create VBA procedure? Review https://support.office.com/en-us/art...7-70649e33be4f
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Replies: 3
    Last Post: 06-19-2016, 07:46 AM
  2. sending email from outlook
    By darwish in forum Programming
    Replies: 1
    Last Post: 04-16-2014, 07:49 AM
  3. Replies: 1
    Last Post: 05-05-2013, 12:13 PM
  4. sending data into an email body - outlook
    By webisti in forum Access
    Replies: 6
    Last Post: 02-15-2012, 07:05 AM
  5. Replies: 1
    Last Post: 03-09-2006, 01:50 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums