Share via

Disable AutoExec Macro - Microsoft Access 2003

Anonymous
2010-12-05T17:45:59+00:00

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.

Microsoft 365 and Office | Access | For home | Windows

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.

0 comments No comments

Answer accepted by question author

HansV 462.6K Reputation points
2010-12-06T07:12:00+00:00

Hold down the Shift key while opening the database. This will bypass the AutoExec macro and startup options.

Was this answer helpful?

2 people found this answer helpful.
0 comments No comments

Answer accepted by question author

ScottGem 68,830 Reputation points Volunteer Moderator
2010-12-07T14:54:06+00:00

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

Was this answer helpful?

0 comments No comments

Answer accepted by question author

ScottGem 68,830 Reputation points Volunteer Moderator
2010-12-06T13:37:01+00:00

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

Was this answer helpful?

0 comments No comments

11 additional answers

Sort by: Most helpful
  1. Anonymous
    2010-12-07T01:44:39+00:00

    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

    Was this answer helpful?

    0 comments No comments
  2. Deleted

    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