When you open the Database Window, select Macros under Objects and click on the New button.

The following Macro window screen should appear.

In the Action column, click the arrow to display the list of available actions and select the action you want to use. There are several dozen actions to choose from. Depending on the action selected, you may have to specify Action Arguments in the lower part of the window. For example, if you select the OpenForm Action, the following Action Arguments appear in the lower part of the window for input.


If you want to add more actions to the macro, move to another action row and select a new action. Note that Microsoft Access carries out the actions in the order you list them.
Comments for the action are optional.
To save the macro, click on the "Save" icon and enter a name for your macro. Make sure you name this macro "Autoexec". By naming it Autoexec, Access will run this macro every time the database is opened.

Note: If you want to insert an action between two existing action rows, click the selector for the action row just below the row where you want to insert the new action and then click Insert Row
on the toolbar.