A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Office » General Discussions
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

"AutoClose" macro in Access



 
 
Thread Tools Display Modes
  #1  
Old August 24th, 2005, 11:30 AM
Helge V. Larsen
external usenet poster
 
Posts: n/a
Default "AutoClose" macro in Access

Excel 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 ?


  #2  
Old August 27th, 2005, 04:30 PM
Beth Melton
external usenet poster
 
Posts: n/a
Default

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/


"Helge V. Larsen" (AndThis) wrote
in message ...
Excel 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 ?




  #3  
Old August 29th, 2005, 08:06 AM
Helge V. Larsen
external usenet poster
 
Posts: n/a
Default

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

"Beth Melton" wrote in message
...
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/


"Helge V. Larsen" (AndThis) wrote in
message ...
Excel 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 ?






  #4  
Old August 29th, 2005, 02:35 PM
Beth Melton
external usenet poster
 
Posts: n/a
Default

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/


"Helge V. Larsen" (AndThis) wrote
in message ...
I 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.

"Beth Melton" wrote in message
...
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/


"Helge V. Larsen" (AndThis)
wrote in message ...
Excel 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 ?








 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to run an Excel macro from Access Brent E General Discussion 4 December 7th, 2005 11:31 PM
Attn MVPs: MS Access Issues Imposed By IT Dept. Tiffany General Discussion 9 September 12th, 2005 09:07 PM
Ambiguous Name Error pm Using Forms 10 June 5th, 2005 09:19 PM
Access 2003 runtime mode-can't turn off warning messages for macro Bitsy General Discussion 2 February 5th, 2005 09:08 PM
Access Error Message when opening database eah General Discussion 3 January 26th, 2005 11:04 AM


All times are GMT +1. The time now is 11:54 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.