A family of Microsoft relational database management systems designed for ease of use.
Hold down the Shift key while opening the database. This will bypass the AutoExec macro and startup options.
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I have created a new database and I created an AutoExec macro that starts a form that will run a macro to shut down the database after a few hours. I was doing some experimenting and accidently changed the time for the form to run the macro to 360 milliseconds. Needless to say, I open the database and it shuts down immediately. Is there any way to disable the AutoExec macro before or during opening process? Otherwise I think I may be screwed and have to start over again.
A family of Microsoft relational database management systems designed for ease of use.
Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.
Answer accepted by question author
Hold down the Shift key while opening the database. This will bypass the AutoExec macro and startup options.
Answer accepted by question author
Hi Scott, That worked perfectly. Thank you everyone for your help. Surprising how simple some of these things are. As for the other post you gave me to look at, I didn't really understand some of what was entered there. I don't get into VBA too much, but I have looked around. The timer I have works great, for the most part. The only time it doesn't is if someone has left a dialog box open on one of the search functions I have set up for them. When they do this, the timer doesn't work until that dialog box is closed. If you know a simple way to have Access close the dialog box when the auto close macro runs, that would be great, otherwise I will just live with it for now. There is only one computer that is always left on for some reason. Thanks again, Darren
Not sure what you mean by the Auto-close macro. But this is really where you need VBA. With VBA you can cycle through ALL the open forms closing them, eliminating that problem
Sub AllOpenForms()
Dim frm As Form
' Enumerate Forms collection.
For Each frm In Forms
DoCmd.Close frm.Name
Next frm
End Sub
Hope this helps, Scott<> P.S. Please post a response to let us know whether our answer helped or not. Microsoft Access MVP 2010 Blog: http://scottgem.spaces.live.com/blog Author: Microsoft Office Access 2007 VBA Technical Editor for: Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports and Queries
Answer accepted by question author
Shift key should work. You might want to check out this discussion about detecting idle time and shutting down:
http://dbaspot.com/forums/ms-access/341511-detect-idle-time.html
Hope this helps, Scott<> P.S. Please post a response to let us know whether our answer helped or not. Microsoft Access MVP 2010 Blog: http://scottgem.spaces.live.com/blog Author: Microsoft Office Access 2007 VBA Technical Editor for: Special Edition Using Microsoft Access 2007 and Access 2007 Forms, Reports and Queries
Hi Scott, That worked perfectly. Thank you everyone for your help. Surprising how simple some of these things are. As for the other post you gave me to look at, I didn't really understand some of what was entered there. I don't get into VBA too much, but I have looked around. The timer I have works great, for the most part. The only time it doesn't is if someone has left a dialog box open on one of the search functions I have set up for them. When they do this, the timer doesn't work until that dialog box is closed. If you know a simple way to have Access close the dialog box when the auto close macro runs, that would be great, otherwise I will just live with it for now. There is only one computer that is always left on for some reason. Thanks again, Darren
This answer has been deleted due to a violation of our Code of Conduct. The answer was manually reported or identified through automated detection before action was taken. Please refer to our Code of Conduct for more information.
Comments have been turned off. Learn more