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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
"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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|
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 10: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 08:08 PM |
Access Error Message when opening database | eah | General Discussion | 3 | January 26th, 2005 10:04 AM |