Results 1 to 3 of 3
  1. #1
    jkid817 is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Jun 2013
    Posts
    1

    Create And Email Multiple Reports, Access 2010

    Here is what I have. I have a table with customer account numbers, a table with customer emails, and a query that creates a report on the customer’s equipment (Equipment Health Report). These tables are linked but I need to keep my two tables seperate so I can't combine them into one table.



    What I need is a way to have the report run by getting a customer account number, run the report, email the report to the customer, and then go get the second account number. I need this to repeat until all of the customers have received a report without any further input from me except to hit the outlook send button. I need this report to be sent as an attachment to the email.

    P.S. – I’m a Visual Basic noob so please no techno speak.

    Thanks

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

  3. #3
    pfales is offline Novice
    Windows 7 64bit Access 2010 64bit
    Join Date
    Apr 2013
    Posts
    23
    I am not sure if this will be of any help but here is some code a friend gave me to assist in emailing my reports from ACCESS. I hope it hepls you of course you will need to make modifications to meet your needs.

    ""Code Start"""Public Function GetLocEmail(strLocation As String, strLocEmail As String)
    Dim db As Database
    Dim rst As Recordset
    Dim varBookmark As Variant
    Dim strMessage As String
    Dim strSeek
    Set db = CurrentDb()
    Set rst = db.OpenRecordset("tblLocation", dbOpenDynaset, dbSeeChanges)
    With rst
    ' Set the index.
    strSeek = "[LocationCode] = '" & Trim([strLocation]) & "' "
    ' Store current bookmark in case the Seek fails.
    varBookmark = .Bookmark
    .FindFirst strSeek
    If .NoMatch Then
    MsgBox ("Invalid Location Code Entered")
    Else
    If Len(Trim(![POC1Email]) > 0) Then
    strLocEmail = Trim(![POC1Email])
    If Len(Trim(![POC2Email])) > 0 Then
    strLocEmail = strLocEmail & ";" & Trim(![POC2Email])
    End If
    End If
    End If
    .Close
    End With
    End Function"

    ""Code End""

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

Similar Threads

  1. how to send email in access 2010
    By nickblitz in forum Access
    Replies: 3
    Last Post: 10-29-2012, 07:28 AM
  2. Email Individual Access Reports
    By Nae in forum Reports
    Replies: 3
    Last Post: 08-26-2012, 04:39 PM
  3. Replies: 8
    Last Post: 05-29-2012, 02:10 PM
  4. Multiple Reports in email
    By Madmax in forum Reports
    Replies: 3
    Last Post: 09-26-2011, 11:05 AM
  5. Issues in Create Email Options : Access
    By shwetasabne in forum Import/Export Data
    Replies: 1
    Last Post: 06-30-2011, 08:35 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