Results 1 to 6 of 6
  1. #1
    Parminder is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    8

    Logged In user Names

    Hello,



    I was trying to retrieve the list of persons currently opened the MS-ACCESS database.
    How can I check that?
    I will wait for the reply.

    Regards
    Parminder

  2. #2
    Bob Fitz's Avatar
    Bob Fitz is offline Access Developer
    Windows 7 32bit Access 2003
    Join Date
    May 2011
    Location
    Essex UK
    Posts
    3,530
    Is the db split
    If this helped, please click the star at the bottom left of this posting and add to my reputation . Many thanks.
    Bob Fitzpatrick

  3. #3
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    When someone opens db I have code that records this info into a Users table. The code is behind a form that opens by default.
    Code:
    Private Sub Form_Open(Cancel As Integer)
    Me.tbxUser = Environ("USERNAME")
    If DLookup("UserID", "UserLog", "UserID='" & Me.tbxUser & "'") & "" = "" Then
        CurrentDb.Execute "INSERT INTO UserLog(UserID, ComputerID, LogIn) VALUES('" & Me.tbxUser & "', '" & Environ("COMPUTERNAME") & "', Now())"
    Else
        CurrentDb.Execute "UPDATE UserLog SET ComputerID='" & Environ("COMPUTERNAME") & "', LogIn=Now(), LogOut=Null WHERE UserID='" & Me.tbxUser & "'"
    End If
    End Sub
    
    Private Sub Form_Close()
    CurrentDb.Execute "UPDATE UserLog SET LogOut=Now() WHERE UserID='" & Me.tbxUser & "'"
    End Sub
    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.

  4. #4
    Parminder is offline Novice
    Windows 8 Access 2013
    Join Date
    Jul 2015
    Posts
    8
    I put the db on ethernet so that everybody can have access to the db. But now I want to retrieve the information about user who is currently using the db and I want to display the username of their computers from where they are accessing the db.

  5. #5
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,815
    I don't know anything about Ethernet. My sample code shows pulling computer name from network.
    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.

  6. #6
    Perceptus's Avatar
    Perceptus is offline Expert
    Windows 7 64bit Access 2007
    Join Date
    Nov 2012
    Location
    Knoxville, Tennessee
    Posts
    659
    IF the DB is split or isn't split. you can use in run box (WindowsKey + R) "CompMgmt.msc /computer:\\<ComputerName>" to view all the open file shares for any files on the computer. This should list a number of open connections to the Access database file and associated lock files. As well as which network users has the open file handles.

    Also if you have RPC perms on the network and to the PC. you could try in a command prompt
    "query process /Server:<computername>"

    Will list all the open processes for <computername>. which would then list "MSAccess.exe" in theory.

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

Similar Threads

  1. Access 2010 : Current logged in user
    By raghav_pegausis in forum Access
    Replies: 7
    Last Post: 10-24-2011, 02:52 PM
  2. Replies: 0
    Last Post: 09-27-2011, 12:25 PM
  3. logged user name on main form
    By foxtet in forum Forms
    Replies: 1
    Last Post: 07-30-2011, 03:00 PM
  4. Getusername of currently logged in user
    By nkuebelbeck in forum Access
    Replies: 8
    Last Post: 06-29-2011, 04:06 PM
  5. Currently logged in user into text box
    By ne16428 in forum Security
    Replies: 5
    Last Post: 06-10-2009, 11:46 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