Hi I implemented your method for tracking user logon and logoff. I have a login form and used the code to insert the logon event after the user's username and pssword have been checked. I used the code to insert the logoff event in the form's unload event. The login form stays open in hidden mode after the users have logged in. The login events are recorded without any issue but the logoff event recording is behaving strangely. Multiple logoff events are often recorded, sometimes 3 or 4 within seconds, sometimes minutes apart? The weirdest one was when 30 logoff events were recorded for one user. Can't understand what would cause this - I would think the form can only have one unload event? Any ideas what could be causing this? Thanks
That is quite strange. You're running it in the On Unload event? You're right, that usually only fires once per form close. Without seeing your database, it's difficult to say. Maybe try running down the Troubleshooter.
Norman Houghton 4 months ago
Hi Richard, just for information, I think it was probably being caused by corruption in the database.
One day when trying to open the database I got an error message saying Access had detected the database was in 'an inconsistent state' and it would try to recover it. It did recover successfully without any apparent loss of data and I haven't seen the problem with recording multiple logoffs since.