Mark Slyder wrote:
> Does anyone have a good way to capture users logging in and out of an
> Access DB using the standard security built in to Access?
>
> Looking to see when users log in to the database as well as who was
> the last to log in during a day. Doesn't have to be pretty, just
> some type of way to capture the info.
>
> Currently have users logging in through the User Level Security.
> Thanks.
You can write to a log file in the Open event of whatever form you open at
startup or execute some code with the AutoExec macro. Logging out can use
the close event of a form that you keep open all the time. If you have no
such form you can open a small hidden form at startup exclusively for this
purpose.
The "log out" aspect is less reliable because it will only log out when the
file and/or Access is closed normally. If they have an Access freeze-up or
their PC is restarted then you won't get a log out record. The login though
should be pretty solid.
--
Rick Brandt, Microsoft Access MVP
Email (as appropriate) to...
RBrandt at Hunter dot com
|