Office Button

  • Thread starter Thread starter kenrav
  • Start date Start date
K

kenrav

In my Acc2007 application I log certain events (logons, logouts, lock-outs,
etc.) to a text file. However, many users click the Office Button and exit
by either clicking the Close Database or Exit Access buttons. My question is
whether anyone knows of anyway I can capture either of these two events as
well? Thanks.
 
Since Access does not trigger any event for application close, the usual
approach is to open a hidden form and use its close (or unload) event to
simulate it.
 
kenrav said:
In my Acc2007 application I log certain events (logons, logouts,
lock-outs,
etc.) to a text file. However, many users click the Office Button and
exit
by either clicking the Close Database or Exit Access buttons. My question
is
whether anyone knows of anyway I can capture either of these two events as
well?


About the best you can do is open a hidden form at startup, and use the
Close event of that form to log the fact that the database is closing.
 
In my Acc2007 application I log certain events (logons, logouts, lock-outs,
etc.) to a text file.  However, many users click the Office Button and exit
by either clicking the Close Database or Exit Access buttons.  My question is
whether anyone knows of anyway I can capture either of these two events as
well?  Thanks.

One way is to open a hidden form when the database opens and have code
execute in the Close event of this form. It will execute before the
database closes or Access exits, so you can log events there... just
call them in the Close event of this form.
 
Back
Top