Computer Problems? Call Toll Free @ 1 877 316 9417
Troubleshoot all your computer problems with certified tech experts, Call Today!


How to prevent the AUTOEXEC macro from running when opening a database

The autoexec.bat file is used to configure your PC. Though this batch file is almost a history now, Access has a similar starting mechanism called the AutoExec macro. This macro has been around since Access 2 and is still an important foundation for protecting your database. When your database opens, Access first processes the startup options and then looks for and runs the AutoExec macro.

The solution to the problem

Follow the instructions to prevent the AUTOEXEC macro from running when opening a database:

  1. 1

    Select the ‘File’ menu and select ‘Open Database’.

  2. 2

    Select the database location from the ‘Directories’ list box.

  3. 3

    Select the database name from the ‘File Name’ list box.

  4. 4

    Press and hold down ‘Shift’.

  5. 5

    Click ‘OK’.

  6. 6

    Release ‘Shift’.


A good AutoExec macro can launch one or many different procedures or objects. In my view, the actions in the macro should either open a form or run a VBA function. Though a macro can do many things, it is recommended that you restrict this macro to simple tasks and leave complex tasks to VBA.

Leave a Reply