Who is logged into my access database now?

Posted on 2009-12-24
Last Modified: 2012-05-08
...Christmas eve .... Dublin 08:54

Is there any way of seeing who is currently logged into my database?
What about an audit of who/when people logged in over the last month etc.
Question by:Patrick O'Dea
    LVL 30

    Accepted Solution

    Check help, and look for currentuser.

    When a user logs on to a datatbase save CurrentUser and other info to a table.
    LVL 9

    Assisted Solution

    When multiple users log into access there is a lockfile created in the same director as the access application file.  This lock file lists the users who are logged in.

    Author Closing Comment

    by:Patrick O'Dea
    I am solving by use of autoexec and currentuser etc.

    Thanks all.
    LVL 56

    Expert Comment

    by:Jim Dettman (Microsoft MVP/ EE MVE)
    <<When multiple users log into access there is a lockfile created in the same director as the access application file.  This lock file lists the users who are logged in.>>
      That's not quite right.  While in most cases it is true, the .LDB file can contain "phantom users" who although listed, are not currently connected to a database.  To actually determine if a user is currently connected, you need to see if there is a user lock being held.
      Simplest way though is by using the JET show roster function.  Here's a MSKB article with code:
      This is ADO based.  There is a DAO alternative.
     Also, your going to find CurrentUser() less then helpful unless you've established ULS (User Level Security) or Workgroup security, as it will return the user 'admin' for every user.
      A better approach is to get the current netowrk login name. I have code for that if you want it.

    Featured Post

    What Should I Do With This Threat Intelligence?

    Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

    Join & Write a Comment

    Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
    In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
    Familiarize people with the process of retrieving data from SQL Server using an Access pass-thru query. Microsoft Access is a very powerful client/server development tool. One of the ways that you can retrieve data from a SQL Server is by using a pa…
    Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

    728 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    21 Experts available now in Live!

    Get 1:1 Help Now