Microsoft Access 2010 tutorial:Create autoexec macro

Create autoexec macro

IV. Create autoexec macro

Autoexec macro runs before the other actions or vba code; it runs immediately when your database opens. Usually, autoexec macro is used for the main form. When the database first opens, you may want the main form of your database to open before other forms, tables, queries, or reports. To create an autoexec macro is not different from creating other macro actions. For example, when your database first opens, you want log in form to open before other forms; because you need the user to sign in before you can use some forms in the database. To do this task, you need to create an autoexec macro to open the log in form. To create the autoexec macro, follow the steps below:

- Click Create tab

- Click Macro in the Macros & Code group

- Type OpenForm or select OpenForm from the list by clicking the drop-down arrow of Action column.

- Fill in the required information of the action as the figure:

Access autoexec macro 

- Click Save to save the macro name AutoExec

- Close your database and then reopen it, you will see the log in form run when your database first open.

Note: Autoexec macro can run is depending on the name of autoexec.



This website intents to provide free and high quality tutorials, examples, exercises and solutions, questions and answers of programming and scripting languages:
C, C++, C#, Java, VB.NET, Python, VBA,PHP & Mysql, SQL, JSP, ASP.NET,HTML, CSS, JQuery, JavaScript and other applications such as MS Excel, MS Access, and MS Word. However, we don't guarantee all things of the web are accurate. If you find any error, please report it then we will take actions to correct it as soon as possible.