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

    Generating Automated Email through Query

    Hello,



    I am fairly new to Microsoft Access and am trying to generate automated emails for my supervisor 90 days prior to the due date. I have a master table from which I created a query that lists all of the information I need. The fields that are included in the query are the employee name, email and due date. I also added a 'NumDay" field within the query which calculates the difference between the due date and todays date. I want to know how to create a module or query which can generate automated emails of the employees once the "NumDay" field reaches 90.

    Thanks,
    Nigel Herbert

  2. #2
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 10 Access 2013 32bit
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922

  3. #3
    Bulzie is offline VIP
    Windows 7 64bit Access 2007
    Join Date
    Nov 2015
    Posts
    1,511
    Nice link Rural.

    Nigal I think maybe first one in link might work for you "
    Sample Code illustrating looping through a DAO recordset"

    Basically you want to run code that will loop through your query and send an email for each record. This can be placed on a Button for manual trigger or can be on say the OnOpen event of a form, you would add code at the end to Quit the Database. You would set this up to run the database on the PC Scheduler so it will open at a set interval, run the code(send the emails), then close the database and wait for the next time to run.

  4. #4
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,646
    If you want the email procedure to automatically run at scheduled times, say every night after 6pm, the only way I could figure out how to do that is with a VBScript and then set a task in Windows Task Scheduler to run the script. Review https://www.accessforums.net/showthread.php?t=21555
    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. Automated email for reports
    By caniread in forum Reports
    Replies: 4
    Last Post: 08-02-2016, 09:39 PM
  2. Automated Email Question
    By siggybaby_18 in forum Access
    Replies: 16
    Last Post: 12-02-2013, 08:48 AM
  3. Automated Email using Outlook
    By imran688 in forum Programming
    Replies: 25
    Last Post: 11-12-2012, 03:02 AM
  4. Automated Email Notification
    By sai_rlaf in forum Access
    Replies: 5
    Last Post: 12-07-2011, 06:33 PM
  5. Automated email from access
    By jfuller in forum Access
    Replies: 3
    Last Post: 04-11-2011, 02:56 PM

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