Results 1 to 2 of 2
  1. #1
    tigers is offline Novice
    Windows XP Access 2003
    Join Date
    Mar 2006
    Posts
    28

    Sending an Email with Data from Access - but it is several records for each email address

    Hi,


    I'm trying to see if I can do this myself without having to bother our IT department.

    I have a list of 50 people and they need to get a report for 5 records they are responsible for. So, if I was doing this the old fashioned way, I'd set up a report in access and have it break at each person then print and send 50 reports via snail mail to each person. I would love to be able to use access.

    I tried the Word Merge Function under external data but it is sending one email for each of the 5 records so that ends up in 250 emails sent out and the recipients will get annoyed. I want it all consolidated into one email (5 records per email per email address so that I'm only sending out 50 emails.

    I am running 2010.

    Any ideas? I would greatly appreciate any help and I just have a feeling there might be an easy answer I'm not seeing.

    thanks!!
    Christina

  2. #2
    aytee111 is offline Competent At Times
    Windows 7 32bit Access 2013 32bit
    Join Date
    Nov 2011
    Location
    Nomad
    Posts
    3,936
    Create a procedure that sends the email and loop thru the email addresses. Inside that procedure your value for the text (body) will be another procedure, such as this:

    Code:
    Private Function Task1Body()
        Dim rst As DAO.Recordset, BodyStr As String
        On Error Resume Next
        
        Set rst = CurrentDb.OpenRecordset(Task1Qry, dbOpenDynaset)
        rst.MoveFirst
        
        Do Until rst.EOF
            BodyStr = BodyStr & Trim(rst!Valuation) & vbCrLf
            rst.MoveNext
        Loop
        
        Task1Body = BodyStr
        
    End Function

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

Similar Threads

  1. Replies: 3
    Last Post: 03-21-2016, 08:59 AM
  2. Email report to value (email address) in a field
    By JackieEVSC in forum Programming
    Replies: 7
    Last Post: 08-28-2015, 11:18 AM
  3. Replies: 1
    Last Post: 12-22-2014, 09:21 PM
  4. Replies: 1
    Last Post: 05-01-2014, 11:37 AM
  5. Replies: 1
    Last Post: 07-16-2013, 12:16 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