Results 1 to 4 of 4
  1. #1
    teebumble is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    21

    obtain record from report

    Hi,



    I have a report (record source 'emailreports' ) that contains a list of employees who need to complete their training. When the admin click on the report button, the admin has to enter the manager's username (the first part of their email address). The 'emailreports' will populate the report with a list of employees who belongs to the manager and document number that each employee needs to complete. Is there a way for me to use this information and put it on the Send email lines?

    Example (step by step):
    1. Click 'Daily Training Report'
    2. Enter Manger username --> admin inputs 'aapple'
    3. Word doc opens with the following information:

    Employee name username doc number
    Amy Adams aadams 1152-125
    Amy Adams aadams 1152-135
    Bob Sing bsing 1204-145
    Bob Sing bsing 1152-135


    Code:
     
    With iMsg
    Set .Configuration = cdoConfig
    .To = obtain from admin input 'from example it would be aapple@123.com 
    .CC = obtain from report ' from example it would be aadams@123.com, bsing@123.com
    .BCC = ""
    .From = abc@123.com
    .Subject = "Weekly Training Updates"
    .TextBody = "Please see the attached document for training updates"
    '.Addattachment "C:/" & savename
    .Send
    End With
    Thanks,

    teebumble

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows XP Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,898
    What does Word document have to do with this?

    You would have to open a recordset of the relevent employees, cycle through the recordset and build the CC string.
    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
    teebumble is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    21
    I output the report data to word so the employees can edit as needed and print the document.

    I'll try the recordset in the report.

    thanks!

  4. #4
    teebumble is offline Novice
    Windows XP Access 2003
    Join Date
    Jun 2011
    Posts
    21
    thanks for the recordset idea. it works!

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

Similar Threads

  1. Obtain value of textbox - continuous form
    By jgelpi16 in forum Programming
    Replies: 1
    Last Post: 03-31-2011, 07:54 AM
  2. Obtain value in record
    By jgelpi16 in forum Programming
    Replies: 1
    Last Post: 01-20-2011, 08:52 AM
  3. obtain value from listbox
    By englisap in forum Programming
    Replies: 6
    Last Post: 01-11-2011, 12:59 AM
  4. Obtain the MAX values on a monthly basis
    By rajmns in forum Queries
    Replies: 1
    Last Post: 12-14-2010, 02:32 PM
  5. Obtain data from another table
    By Suzied in forum Database Design
    Replies: 0
    Last Post: 03-23-2010, 11:52 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