Opening Forms at Startup

If you have a form you would like to open upon starting your application, you have two options. You can use a splash screen or an AUTOEXEC macro.

Splash Screen

A splash screen is a form that appears briefly upon startup and then automatically closes. Often, a splash screen is used to hide what is happening in the background. Follow the steps below to create a splash screen.

First, create an unbound form. In the Form objects, click on New, then Design View. Place any text or images you wish on the form. This is a good place to put a copyright notice and the version number of your application.

Set the following properties.

Views Allowed Form
Scroll Bars Neither
Record Selectors No
Navigation Buttons No
Dividing Lines No
Auto Center Yes
Border Style None
Control Box No
Min Max Button None
Close Button No
Width Specify a width
Timer Interval 5000 (the equivalent of 5 seconds)
Save the form as frmSplash.

When the splash screen closes you will want another form to open. To do this, seleect the OnClose property. Click on the drop-down arrow and choose Event Procedure. Then click on the build button (the button with the three dots). Type DoCmd.OpenForm “frmFormName” where frmFormName is the name of the form you want to open when the splash screen closes.

To close the frmSplash form when the Timer Interval is reached, select the OnTimer property, choose Event Procedure and click on the Build button. Type DoCmd.Close.

Close the module.

The last task is to change the startup properties to display the splash screen when the application is run. On the menu bar click on Tools and choose Startup. From the Display Form drop-down list, select frmSplash. Uncheck the Display Database window. Click OK.

Close the database and reopen it to test it.

AUTOEXEC macro

The AUTOEXEC macro runs when the database application first opens. So any macro commands in the AUTOEXEC macro will run after the Startup options take effect. To open a form when an application is run, create the following macro.

In the Macro objects, click on New. In the Action cell, click on the drop-down arrow and choose OpenForm. In the Form Name cell under Action Arguments (which appears in the bottom half of the window), click on the drop-down arrow and choose the form you want to open when the database is run.

You can add other commands, for example, Maximize, that you want to run upon startup.

Name the macro AUTOEXEC. Regardless of the naming standards you are using, do not add a prefix to the macro name. The name must be AUTOEXEC to automatically run at startup.


Go to Top of Page

Return to the Homepage