i dont know what that code does, but i have a userlog (table) i keep for all of my databases. when they open the db, their windows logon ID is stored with the date/time they've opened it. when they close the db, the date/time they close is logged. i always know who is in which database.