You could load a hidden form when Access starts and use its Unload
event to trigger your code. The way this works is if the database is
closed in any way the form will be unloaded.
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.
~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP
Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
Post by Helge V. LarsenI am developing an application that is used/tested by several others.
The general users/testers need some buttons on a toolbar that is part
of the application. But during the development I need some more
buttons. These buttons are added to the toolbar when the application
is opened - if Environ("USERNAME")=<My usercode>. When the
application is closed I would like to remove them again - if
Environ("USERNAME")=<My usercode>.
Access only supports an AutoExec macro. What do you want your macro to do?
Please post all follow-up questions to the newsgroup. Requests for
assistance by email can not be acknowledged.
~~~~~~~~~~~~~~~
Beth Melton
Microsoft Office MVP
Word FAQ: http://mvps.org/word
TechTrax eZine: http://mousetrax.com/techtrax/
MVP FAQ site: http://mvps.org/
Post by Helge V. LarsenExcel has Auto_Open and Auto_Close VBA routines that are
automatically run when the workbook is opened and closed.
Access has an AutoExec macro that is automatically run when the
database is opened.
I need an equivalent "AutoClose" macro in Access - but this option
does not exist.
How can I run a macro or some VBA code when a database is closed ?