Levans said:
Can you reword your steps I got the VB but you mentioned about forms and rows??
Please help
Will this ouput group memberships aswell?
Sorry, I guess I got a little ahead of myself there.
I'm not sure what you mean by group memberships. I go for network user
name and machine name.
The databases where I use this have a default form. In the form's Open
(not load) event I fire code that figures out the user ID, assigns a
unique SessionID, and inserts a new row in the "UserAudit" table with
the current time as InTime. On the same form's Close event I update
OutTime on the same row (identified by unique SessionID) with the
current time.
I can see who's currently using the database by looking at UserAudit
table rows with no OutTime. Moreover I can track who uses the database
and when because every session is logged.
The site I referenced above also has code to determine the machine name.
Having said all that there is a way to parse the ldb file for machine
ID's, but this only tells you which machines currently have the database
open.
Hope this clarifies things a bit.