Results 1 to 4 of 4
  1. #1
    Join Date
    May 2004

    Unanswered: Tracking database access

    Unfortunately, I'm not familiar with Visual Basic.
    Is there a way with Access 2003 to keep track of what user (and when) accounts logged into a secure Access database, without using VB ?

  2. #2
    Join Date
    Jan 2007
    Provided Answers: 10
    Quote Originally Posted by Pathology
    without using VB ?
    Yes, you can use VBA
    (VBA = Visual Basic for Applications, which is what Access uses)

    I'm not aware of anyway you can do this without coding it yourself - but as always, someone will hopefully prove me wrong and we'll both learn something
    Home | Blog

  3. #3
    Join Date
    Dec 2004
    Madison, WI
    You could create a log table in the specific mdb and write the user name and date/time they opened it on startup of the mdb. Another option (if you want to track what program (mdb) a user opens and when), you could create a menu type program which tracks what mdb (or file) they launched. Here's an example:

    I don't know of any specific log type files in an mdb/mdw which track user's and when used times.

    Another thing I will do regarding MSAccess files is I will launch the mdb (or shortcut with mdw) via a vb script (although you wanted to avoid vb - the script only has a few lines of code in it and shows you the 2 lines to change) which clones the source mdb with the user's login name and opens that mdb file. I can then look at the folder and see when each user last opened the mdb file by looking at the date/time the mdb with their login name was created (and even if they are currently in it as an *.ldb will appear for the mdb file with the user's name.) You must utilize linked tables (MSAccess or SQL Server) in order to clone an mdb and launch the clone though. See the example in the code bank on how to clone and launch the cloned mdb in a vb script (which you edit with notepad).
    Last edited by pkstormy; 11-20-07 at 15:11.
    Expert Database Programming
    MSAccess since 1.0, SQL Server since 6.5, Visual Basic (5.0, 6.0)

  4. #4
    Join Date
    Jun 2004
    Arizona, USA
    Although you wanted to avoid VB, it would be fairly simple to poll the .ldb file every 30 seconds or so using VB. The users who have ascessed the database since the file was created will be listed there, so this approach will be taking 'snapshots' of who has been there.

    Now, you wouldn't know when the user left if more than 1 person was using it, as user names aren't removed from the ldb file - only added. Presumably this approach was followed in order to speed up re-connecting to the file.

    If there's no file present, no-one is in the database at that instant.

    Ref Access - Who's on First???
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts