Results 1 to 6 of 6
  1. #1
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69

    Email Access Report to multiple receipients

    I have a Access 2010 filtered report (filtered on action owner). I also have a query which gives the list of action owners with their email id who has actions pending.

    At present I email a common report of all pending actions of all owners to everybody. I feel it is not right as everybody see other's pending actions. What I would like to do is to email the filtered report only to the concerned action owners so that the pending actions of one owner should not go to anybody else. I use Macro action "Email database object" and send the report in PDF format.

    I have two unbound text fields set on a form from where the email command button operates. These two text fields can store the name and email id from the query. What I don't know is how I assign the name and email id to the text boxes through a macro from the query. I mean if there are 10 people in the query, it set values of first record to these text boxes, send mail to him, then set values of second record, send email to him and so on until it finish all 10 people.

    Any thoughts and ideas highly appreciated. I couldn't find anything like Do while EOF - Next Loop in Macro actions.



    Thanks in advance.

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    In VBA, open recordset object of the ownersID and email fields. In loop structure, open report filtered to owner of the current record, send email, close report, move to next record, repeat.
    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
    rkalapura is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    Jul 2011
    Location
    New York
    Posts
    69
    Thank you june7 for your reply. I am not very good in VB. Is there any chance to get the VB code to create this loop? I really appreciate your help.

    Thank you once again.

  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,770
    This is a common topic. Search forum and/or web. For a start, review https://www.accessforums.net/program...ook-21903.html
    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.

  5. #5
    NTC is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    Nov 2009
    Posts
    2,392
    Sending a report as a pdf attachment is an embedded feature of Access; but triggering/sending multiple reports - each with unique data is not. It will require coding skills. In addition this requirement can be viewed as a security problem / spam machine...so you will find if you use Outlook that even with the looping code working - that there is going to be a warning triggering with each send coming from Outlook.....so that one must manually ok each send. This can be suppressed with a low cost commercial software add-on for Outlook.

  6. #6
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    53,770
    I use Outlook and don't get the popup warning. Might be because of setting in Outlook to allow program to send email. In Outlook: File > Options > Trust Center > Trust Center Settings > Programmatic Access. I will have to double check this on work pc, can't get it to work on home pc.
    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: 2
    Last Post: 06-25-2013, 05:48 AM
  2. Email Access report
    By rkalapura in forum Reports
    Replies: 10
    Last Post: 08-01-2012, 05:28 PM
  3. Email with Access report as attachment
    By kmims44 in forum Programming
    Replies: 1
    Last Post: 07-18-2012, 02:38 PM
  4. Sending Report from Access as attachment in Email
    By taimysho0 in forum Programming
    Replies: 16
    Last Post: 02-09-2012, 12:07 PM
  5. Replies: 2
    Last Post: 08-17-2010, 10:54 AM

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