Automate MS Access: Run Macro on Startup

Victoria Jul 07, 2026

Microsoft Access is a robust relational database management system (RDBMS) that allows users to create, manage, and manipulate databases. One of its powerful features is the ability to automate tasks using macros. Running a macro on startup in Microsoft Access can streamline your workflow by automating repetitive tasks, ensuring data consistency, and improving overall efficiency. Here's a comprehensive guide on how to achieve this.

MS Access - Stored Procedure as Recordset for Forms
MS Access - Stored Procedure as Recordset for Forms

Before we dive into the process, it's essential to understand what macros are and their purpose. Macros are a series of instructions or commands stored in a file that can be executed automatically or manually. They are used to automate repetitive tasks, such as updating records, running reports, or performing calculations. By running a macro on startup, you can ensure that your database is always in a consistent state and that essential tasks are performed every time you open it.

MS Access 2013 to show only startup form and nothing else
MS Access 2013 to show only startup form and nothing else

Creating a Macro in Microsoft Access

Before you can run a macro on startup, you need to create one. Here's a step-by-step guide on how to create a macro in Microsoft Access:

How to Use Macros in Microsoft Access 2013 - Examples of Macros and Using Autoexec
How to Use Macros in Microsoft Access 2013 - Examples of Macros and Using Autoexec

1. Open your Microsoft Access database and click on the "Create" tab in the Ribbon.

2. In the "Macros & Code" group, click on "Macros" and then select "New Macro" from the dropdown menu.

a screenshot of an excel spreadsheet with the access - templates button highlighted
a screenshot of an excel spreadsheet with the access - templates button highlighted

3. In the "Macro Name" field, enter a name for your macro. This name should be descriptive and easy to remember, as it will help you identify the macro later.

4. In the "Press New Line" field, enter the first action you want the macro to perform. You can choose from a wide range of actions, such as opening a form, running a query, or performing a calculation. To add an action, click on the "Add" button and select the desired action from the list.

5. Repeat step 4 to add additional actions to your macro. You can also modify or delete actions by selecting them and using the "Modify" or "Delete" buttons.

MS Access Tutorial
MS Access Tutorial

6. Once you have added all the desired actions, click on the "Save" button to save your macro. You can also choose to save it as a macro module (.bas) file or as a part of your database (.accdb or .mdb file).

Running a Macro on Startup

Now that you have created a macro, you can set it to run automatically every time you open your Microsoft Access database. Here's how to do it:

Tutorial - Creating a Contact Management Database (CRM) using Microsoft Access
Tutorial - Creating a Contact Management Database (CRM) using Microsoft Access

1. Open your Microsoft Access database and click on the "File" tab in the Ribbon.

2. Select "Options" from the dropdown menu to open the Access Options dialog box.

MS Access - A Cost Effective, Powerful Business Tool
MS Access - A Cost Effective, Powerful Business Tool
How to Automate Tasks in MS Access with Macros
How to Automate Tasks in MS Access with Macros
Macro To Open Query in MS Access 2007
Macro To Open Query in MS Access 2007
Tutorial: How to create an Advanced Form in MS ACCESS
Tutorial: How to create an Advanced Form in MS ACCESS
Microsoft Access Issues List Tracking Templates Database  for Microsoft Access 2016 Software - Verified: July 2026 ✅
Microsoft Access Issues List Tracking Templates Database for Microsoft Access 2016 Software - Verified: July 2026 ✅
MS Access Do-While Statement - Microsoft Access Programs
MS Access Do-While Statement - Microsoft Access Programs
Audit Trail using Data Macros
Audit Trail using Data Macros
Top 10 Advanced Features of MS Forms
Top 10 Advanced Features of MS Forms
MS Access
MS Access
Data Recovery, File Recovery and Email Recovery Software by DataNumen
Data Recovery, File Recovery and Email Recovery Software by DataNumen
No More Negative Numbers! Fix MS Access Database Validation Rule
No More Negative Numbers! Fix MS Access Database Validation Rule
how to merge multiple files using power query in windows and mac oss?
how to merge multiple files using power query in windows and mac oss?
MS Access Incident Tracker Database | Accident and Incident Management register | Template
MS Access Incident Tracker Database | Accident and Incident Management register | Template
3 Crosstab Query Techniques in MS Access
3 Crosstab Query Techniques in MS Access
How to Change the MS Access Autonumber
How to Change the MS Access Autonumber
How to open MS access Database in SPSS using Syntax file command
How to open MS access Database in SPSS using Syntax file command
an image of a computer screen with the text, stop using sum function without know how to
an image of a computer screen with the text, stop using sum function without know how to
How to Create an Append Query in MS Access
How to Create an Append Query in MS Access
Concatenation in Access. How to join fields together in Microsoft Access reports and queries.
Concatenation in Access. How to join fields together in Microsoft Access reports and queries.
Automate repetitive tasks by recording macros in Microsoft Excel
Automate repetitive tasks by recording macros in Microsoft Excel

3. In the left-hand navigation pane, select "Current Database" to access the settings for your current database.

4. In the "Application Options" section, find the "Startup Options" group and select the "Run this macro on startup" checkbox.

5. In the "Macro name" field, enter the name of the macro you want to run on startup. You can also use the "Browse" button to browse and select the macro from the list.

6. Click "OK" to close the Access Options dialog box and save the changes. From now on, the specified macro will run automatically every time you open your Microsoft Access database.

Troubleshooting Common Issues

While running a macro on startup can greatly improve your workflow, you may encounter some issues along the way. Here are some common problems and their solutions:

1. **The macro does not run on startup:** Ensure that you have selected the correct macro in the "Macro name" field and that the "Run this macro on startup" checkbox is checked. Also, make sure that the macro is saved and that it contains valid actions.

2. **The macro runs, but it does not perform the expected actions:** Double-check the actions in your macro to ensure that they are correct and that they are in the correct order. You can also test the macro manually by running it from the "Macros" dialog box to verify that it works as expected.

3. **The macro causes an error or crashes Access:** If the macro is causing issues, try simplifying it or breaking it down into smaller macros. Also, make sure that any references in the macro are valid and that the macro is not trying to perform an action that is not supported.

In conclusion, running a macro on startup in Microsoft Access can significantly enhance your productivity and ensure data consistency. By automating repetitive tasks, you can focus on more complex and valuable aspects of your work. With the right macros and proper troubleshooting, you can harness the power of Microsoft Access to streamline your workflow and improve your overall efficiency.