Results 1 to 2 of 2
  1. #1
    slimjen is offline Expert
    Windows XP Access 2007
    Join Date
    Mar 2010
    Posts
    727

    Audit trail username


    Hi all, I am using Audit Trail module to track usere changes in the database..it seems to work fine but the username only captures the userid not the physical name...here's the part of the code:
    Code:
    Dim strUserID as String
    strUserID = Environ("Username")
    The userid for the users does begin with a letter but I want to capture at least their physical first name..what do I need to do pls.

  2. #2
    rpeare is offline VIP
    Windows XP Access 2003
    Join Date
    Jul 2011
    Posts
    5,441
    create a table with the username and person's name seems to be the easiest. I don't believe you can get to the actual name of the user unless their directory name contains their real name. Then you could use Environ("USERPROFILE") and strip out anything after the last \ mark to generate the actual person's name, but most larger companies would us an employee ID rather than a name. Here's a link to all the ENVIRON possibilities:

    http://codevba.com/office/environ.htm#.XUhJs_JKhhE

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

Similar Threads

  1. Audit Trail Help
    By HelpDesk in forum Access
    Replies: 9
    Last Post: 08-07-2015, 06:13 AM
  2. Audit Trail
    By zburns in forum Access
    Replies: 4
    Last Post: 07-27-2015, 08:49 AM
  3. Replies: 2
    Last Post: 02-09-2013, 12:39 PM
  4. Audit Trail
    By bigroo in forum Programming
    Replies: 4
    Last Post: 02-22-2012, 07:55 PM
  5. audit trail
    By slimjen in forum Forms
    Replies: 1
    Last Post: 10-13-2011, 01:52 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