Question Pointless, BUT: Trigger event when database is opened (even while holding shift)?

JGalletta

Windows 7 Access 2010
Local time
Today, 18:42
Joined
Feb 9, 2012
Messages
149
For the sake of giving myself a reminder to do something when I open my database (while I'm designing it of course) I'd like to hard code a msgbox to open when I open the database. I've seen the AutoExec macro option, but that doesn't get triggered when holding shift. What is possible here?
 
Do you have a form which opens when you load the DB? If so, put your message box in the Form_Load event of that. If you don't have such a form, then make one for this purpose and delete it when your design is complete.
 
Yes, but shift clicking disables the automatic opening of forms, as well. (My form that loads when a user opens the database does not open when you shift click.)
 
That's a shame! :mad: I can't immediately think of an alternative, but I'll sleep on it. All things are possible with persistence, I find. :)
 
Nothing will fire if you hold Shift. If you want something fired then don't hold Shift.

Or create your To-Do lists in an appropriate application like Outlook (for example) or create a table which you use solely for entering To-Do tasks. Set a task to fire at a certain time in Outlook or open your table as the first thing and read your tasks.
 
Going back to your original requirement, the question is how you can be selective on what to run during development mode?
In essence, there are two options:
1. External control, such as that suggested by vbaInet
2. Internal control, which is selective and tiggered by someting straight-forward.
Option 1 is complicated and involves other applications and/or services and probably falls in the "too hard" basket for your requirement.
Option 2 seems much more attainable and is easily in your control (given that you are developing the DB).
My approach would be to have a form which loads automatically when the DB opens and check the presence of a table, or a flag within a table. My own solution is to use a menu table which has a series of start-up flags and values which determine behaviour (akin to the Switchboard Manager). One such flag might be a debug code which you can set and which detemines whether to display your reminder or to go to the normal main page. This flag could remain a permanent feature of your DB, so you can set it when you need it for debug purposes.
On balance, I'd stick with the KISS principle and stay within the boundaries of Access to control your startup.
Apologies if this sounds like teaching you to suck eggs, Grandma.;)
 
Haha, very nice.. I like the 'flag' idea, perhaps set to run only when I'm the user. Thanks!
 

Users who are viewing this thread

Back
Top Bottom