AutoExec bypass prompt

stareyesinmpls

New member
Local time
Today, 08:38
Joined
Apr 21, 2010
Messages
1
Hello,

I run a report using an Access database that has an AutoExec macro, and, therefore, runs all code upon opening the database. I appreciate this feature when I am running the report (weekly), but periodically, I need to go into this database and tweak queries, etc. Is there code I can add to the AutoExec macro to prompt me whether or not to run all macros? I am on Access 2007 so holding down shift key does not seem to work.

Your help is appreciated!
 
Holding the shift key will work in Access 2007 but you have to hold it down until it is completely open. Also, you may have enabled the Disable Bypass Key which then the Shift will NOT work.

There are a couple of other ideas too.

1. You could have a table which has one entry in the table and is a boolean. You set it to True if you want the macros to run and to false if you don't. You can then use another Access database to make the change so then it will open based on that entry (you have to use a DLookup first in the macros to find the condition and then do a Stop All Macros when it encounters a false).

2. You could set it to look at the computer name and if it matches yours it doesn't run the macros.

Just a couple of options there.
 

Users who are viewing this thread

Back
Top Bottom