Automatically run an Access Macro when the Database opens using AutoExec

Macros can be setup in Access to help streamline your tasks. Typically after saving a macro you would link it to a button or attach it to a form. This post will teach you how to execute automatically a macro when a user opens up the database. Lets say I typically run a few custom reports the first thing after opening the database. So first I will create a macro that opens the reports I want each time the database is opened.

Access Open ReportFill out the details of the report in the arguments.

Access report arguments

The last thing I do after tasking the macro is to save the macro as “AutoExec”. When a macro is saved as “AutoExec” it will trigger an event to run the macro after the database is opened.

AutoExec macro name for Access

Make sure you do not include spaces while naming it “AutoExec”.





About Steve Chase

I'm a proud husband and dad to 4 boys! Microsoft Certified Trainer and Boy Scout Leader are some of things I call myself. The Cincinnati Reds are my favorite team! When not outdoors, I enjoy working with documents in Microsoft Office, QuickBooks, Visio and Photoshop. My wife, Erin, shares her awesome recipes on her blog at
This entry was posted in Access and tagged , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s