Results 1 to 5 of 5
  1. #1
    New Lounger
    Join Date
    Jun 2010
    Location
    Atlanta
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Does anyone know of a way that upon entering a database, is there a way to keep a log of who opened the database and at what time and then when they closed out of the database? I have never attempted this and my boss was wanting to add this feature.

  2. #2
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Are you using Access Built in Security Login?
    If not, have you got a Login Screen?

    You can Capture the Logged On User when database opens from
    a small script behind the AutoExec macro logging to a Table

    But the method you would use depends upon how and from where users gain access to the database
    Andrew

  3. #3
    New Lounger
    Join Date
    Jun 2010
    Location
    Atlanta
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It wouldn't need a secure login just a table with the fields employee, date/time in - timestamp and date/time out - timestamp. I am not sure how to autopopulate the timestamps in the tables. Any idea on the coding for I am a rookie on coding.

  4. #4
    5 Star Lounger AndrewKKWalker's Avatar
    Join Date
    Apr 2001
    Location
    Cambridge, UK
    Posts
    1,020
    Thanks
    0
    Thanked 3 Times in 3 Posts
    Have a look at the attached Access Demo mdb

    It uses a form that is opened hidden via the autoexec macro.
    On opening the form writes the login time and username into a table,
    and grabs the id of the record onto the form.
    It uses the Function in the basAPI module get the users id from their Windows Login
    You could use Environ Function for this but the API works on all versions of Windows

    When Access Closes the form is automatically shut down by Windows.
    This triggers the Forms Close Event and this writes the LogOut time to the record
    using the data saved on the form

    The User never sees this form

    [attachment=89104:OpenCloseLogger.zip]
    Attached Files Attached Files
    Andrew

  5. #5
    New Lounger
    Join Date
    Jun 2010
    Location
    Atlanta
    Posts
    19
    Thanks
    0
    Thanked 0 Times in 0 Posts
    It works and thanks for your help.

Posting Permissions

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