Results 1 to 3 of 3
  1. #1
    ctonline is offline Novice
    Windows 10 Access 2016
    Join Date
    Feb 2021
    Posts
    10

    User Activity Log

    How do I create a user activity log? This is to log of user activity in term of who create or delete an entry or make changes to it. Thank you for any help or in pointing to any prior forums that has this info. Thanks.

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    I run Post2Log at the point a user does an event.
    it posts to table: tLogs

    usage:
    Post2Log "fAccounts","delete rec", "Rec#:" & txtID

    Code:
    Public Sub Post2Log(pvLoc, pvEvent, pvDescr)
    Dim sSql As String
    Dim vTime vUser
    
    vUser = Environ("Username")
    vTime = now()
    
    docmd.setwarnings false
    
    sSql = "INSERT INTO tLogs ([Location],[Event],[Description],[USER],[EntryDate]) values ('" & pvLoc & "','" & pvEvent & "','" & pvDescr & "','" & vUser & "',#" & vTime & "#)"
    DoCmd.RunSQL sSql
    docmd.setwarnings true
    End Sub

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows 10 Access 2016
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    If you are looking for detailed record and field changes (Add, Modify, Delete) and a time stamp, then I suggest you search for Audit Log or Audit trail.

    Here's one reference

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

Similar Threads

  1. YTD and MTD Sales growth by activity
    By dudumomo in forum Reports
    Replies: 3
    Last Post: 03-13-2012, 01:42 AM
  2. Logging activity on my database
    By Jamescdawson in forum Security
    Replies: 5
    Last Post: 03-09-2012, 04:15 PM
  3. Add activity for each customer
    By nostr4d4m in forum Queries
    Replies: 11
    Last Post: 03-25-2011, 09:08 AM
  4. No activity in last 30 days
    By CMLS in forum Queries
    Replies: 4
    Last Post: 03-18-2011, 11:26 AM
  5. Structured Activity
    By Logix in forum Queries
    Replies: 2
    Last Post: 06-10-2010, 06:05 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