PDA

View Full Version : Tracing Windows User ID's In Access 2000



mattster1010
07-04-2008, 02:25 AM
Good Morning,

Is there anyway that I can trace which user last viewed a record in a table? A form is used to view the records. I was thinking maybe an on exit, on click event, that took the username of the person who just looked at the record and stored the username in a table / field.

Can this be done?

Cheers,

Mattster

OTWarrior
07-04-2008, 02:49 AM
You could have an extra table that records which user opened up a certain record, but the table would become large very quickly, especially if you wanted to record the date and time they opened up the form.

If you just wanted to record the last person who viewed that record, you would need a table that either has a list of all the record unique ID's, or creates them if they aren't there. You would then need to use (I would guess) some sql to check the table for the Record ID, and overwrite the username with the new one.

If you have alot of records, this could be quite slow, and you run into the problem of having two people loading the same record at the same time, which would cause a lock violation.

To answer in a short sentance, yes it can be done.

Hope that makes sense?

OBP
07-04-2008, 04:44 AM
Mattster, I agree with OTWarrior that it can be done, but it is more normal to only log "changes" and "Additions" to the tables rather than just viewing the records.