Results 1 to 6 of 6
  1. #1
    nherbert31 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jul 2017
    Posts
    5

    If,Then Email


    Hello,

    I was wondering if it was possible to do an "If, Then" data macro where if the 90Day field in my access database form equals today then an email will be sent to the associated employee. I have the emails listed in every record of the employees.

    Attachment 29858
    Attached Thumbnails Attached Thumbnails Email.png  

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I expect so, since If conditional and SendEmail action are available. However, which data macro event would you suggest this goes in - AfterUpdate? Have you even tried?
    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.

  3. #3
    nherbert31 is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jul 2017
    Posts
    5
    I did try and left the event under "<Value>". I could not find a "SendEmail" action, there was only a "EmailDatabaseObject" which sends a database object to a specific person. I want this data macro to pull the correct email from the "Email" field when the "90Day" field equals todays date that includes an automated message such as "This is a 90 Day reminder for...".

  4. #4
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Typically to send out reminder emails, you would want to do this in a separate database that is linked to your table using the PC task scheduler. Create task to run once a day that opens this new database. Create one form that gets opened when database is opened and in the OnOpen event, put code to do your emails if they match the date criteria. Then at the end of the code put in Docmd.Quit so it closes the database and waits until the next scheduled run.

  5. #5
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,463
    Here are a few links others have posted that might help with emails.

    http://www.granite.ab.ca/access/email.htm

    https://www.accessforums.net/showthread.php?t=21555

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    Then you aren't looking at a Data Macro design, just a regular macro.

    Do you want to send email when record is created? Or send a batch of emails every day?
    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: 7
    Last Post: 08-01-2017, 06:38 PM
  2. Replies: 2
    Last Post: 05-23-2016, 01:28 PM
  3. Replies: 3
    Last Post: 12-28-2015, 04:11 PM
  4. Replies: 5
    Last Post: 05-07-2014, 09:25 AM
  5. Replies: 1
    Last Post: 05-01-2014, 11:37 AM

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