Results 1 to 2 of 2
  1. #1
    wnicole is offline Competent Performer
    Windows XP Access 2010 32bit
    Join Date
    Sep 2013
    Posts
    118

    Email reports and tracking sent date/time

    Im looking to be able to send a report and also track date and time sent in my database. Is there a thread you can point me to or sample you can send to help me know how to do this.


    I already have in my database tracking of forms date and time. I just don't know how to track when I send a report from my database date and time. Also pending reports that haven't been sent.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    send the report then append a record to the log table.

    Code:
    DoCmd.SendObject acSendReport, "rptName", acFormatPDF, email, , , vSubj, vMsg
    PostLog "Bob Smith" ,"rptName", email
    
    '-----------
    Public Sub Post2Log(pvUser, pvEvent, pvDescr)
    '-----------
    Dim sSql As String
    
    
    docmd.setwarnings false
    sSql = "INSERT INTO tLogs ([USER],[Event],[Descr],[EntryDate] ) values ('" & pvUser & "','" & pvEvent & "','" & pvDescr & "',#" & Now() & "#)"
    DoCmd.RunSQL sSql
    End Sub

    the tLogs table has
    [user]
    [Event]
    [descr]
    [EntryDate] , general date format, default = Now()

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

Similar Threads

  1. Replies: 2
    Last Post: 11-25-2014, 09:21 AM
  2. Replies: 3
    Last Post: 08-16-2013, 04:15 PM
  3. Tracking values in Access reports in Code
    By dahcjohnson in forum Programming
    Replies: 3
    Last Post: 05-11-2012, 04:43 PM
  4. Email Tracking Task
    By raminrooz in forum Access
    Replies: 1
    Last Post: 04-28-2012, 06:29 AM
  5. Automate the email at desired date and time
    By A S MANN in forum Sample Databases
    Replies: 0
    Last Post: 11-08-2011, 10:56 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