Results 1 to 5 of 5
  1. #1
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86

    Automated email for reports


    I have a report that gets filtered by name to show what assignments that person has. Right now I pick the name and run the report. I then email the report to the person. I would like to automate this process by letting access see if that person has an an assignment and if they do run the report and attach it to an email with that persons email filled in and then repeat for all remaining names. I am sure it is possible but I'm only a beginner. Any help would be appreciated.

  2. #2
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Make a form, put a listbox that holds the person , email.
    a button to start the process.
    the on click event, it will cycle thru the list sending each person the report. ( I do this very thing)
    the report query looks at the form listbox,and reports only on the selected.
    select * from table where [user]=forms!frmRpts!lstEmails

  3. #3
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86
    Will the report only include their assignments? Right now I have a combobox on a form, could that also work? I need it to email their customized report only and leave the other assignments off the report.

  4. #4
    ranman256's Avatar
    ranman256 is online now VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Yes, combo box will work too.
    the QUERY will look at the combo and pull only THAT persons work.

    Code:
    for I = 0 to cboBox.listcount -1
       STxt = cboBox.item(I)
       CboBox= sTxt
    
       Docmd.sendTo acReport ,"report"......
    next
    msgbox "done"

  5. #5
    caniread is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Sep 2015
    Posts
    86
    I tried your code but it gave me this error. See image

    Never mind. I fixed it by adding Data to the end of Item.

    One more question. How do I tell it to skip reports with no data?

    I solved it. Code below.

    If DCount("*", "Open Ideas All") > 0 Then
    DoCmd.SendObject acReport, ........
    End If
    Attached Thumbnails Attached Thumbnails error.PNG  
    Last edited by caniread; 08-03-2016 at 02:53 PM.

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

Similar Threads

  1. Automated Email Question
    By siggybaby_18 in forum Access
    Replies: 16
    Last Post: 12-02-2013, 08:48 AM
  2. Automated Email using Outlook
    By imran688 in forum Programming
    Replies: 25
    Last Post: 11-12-2012, 03:02 AM
  3. Automated Email Notification
    By sai_rlaf in forum Access
    Replies: 5
    Last Post: 12-07-2011, 06:33 PM
  4. Automated email from access
    By jfuller in forum Access
    Replies: 3
    Last Post: 04-11-2011, 02:56 PM
  5. Automated Email Reports - monthly no clicks
    By Bamber in forum Reports
    Replies: 1
    Last Post: 05-12-2010, 12:34 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