Office Button

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.
 
A

Allen Browne

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.
 
D

Dirk Goldgar

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.
 
P

Piet Linden

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top