|
-
Mar 23rd, 2005, 06:52 AM
#1
Thread Starter
New Member
MS ACCESS - How can I get a Macro to Auto Run When Database Open + Closes ???
Hello,
Can anyone help ?
I need to Automatically Run a macro when the database opens and Closes ???
Any Ideas ??
Steve 
-
Mar 23rd, 2005, 07:52 AM
#2
Addicted Member
Re: MS ACCESS - How can I get a Macro to Auto Run When Database Open + Closes ???
If you name a macro:
'AutoExec'
it will run each time the database starts.
on close, if you have an exit button:
Code:
docmd.RunMacro "AutoExec"
if you fail to plan, you plan to fail
-
Mar 23rd, 2005, 10:02 AM
#3
Re: MS ACCESS - How can I get a Macro to Auto Run When Database Open + Closes ???
Ewww macros 
VBA coding however ...
Have a splash screen (form) and a background form.
Tools>Start up options to get the splash screen form to open, in the OnLoad event run other code and open the background form (which is tiny and made invisible).
The closing code then goes in the close or unload event of the background form which then is run as the db is shut.
Its another option...
Feeling like a fly on the inside of a closed window (Thunk!)
If I post a lot, it is because I am bored at work! ;D Or stuck...
* Anything I post can be only my opinion. Advice etc is up to you to persue...
-
Mar 23rd, 2005, 10:30 AM
#4
Addicted Member
Re: MS ACCESS - How can I get a Macro to Auto Run When Database Open + Closes ???
 Originally Posted by Ecniv
Have a splash screen (form) and a background form.
Tools>Start up options to get the splash screen form to open, in the OnLoad event run other code and open the background form (which is tiny and made invisible).
The closing code then goes in the close or unload event of the background form which then is run as the db is shut.
background forms can also be used for other tasks so it would be a good idea to implement.
I use one which contains a timer loop and a flag check to allow me to log all of the users out of the database for maintenence.
if you fail to plan, you plan to fail
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|