StartupForm Property

Applies To

Database object.

Description

You can use the StartupForm property to specify the name of the form that opens when your database first opens. For example, you can use this property to display a specified form that contains a menu of all available forms, queries, and reports within a Microsoft Access application when the database opens.

Setting

The StartupForm property is a string expression that's the name of a form in the current database.

The easiest way to set this property is by using the Display Form option in the Startup dialog box, available by clicking Startup on the Tools menu. You can also set this property by using a macro or Visual Basic.

To set the StartupForm property by using a macro or Visual Basic, you must first either set the property in the Startup dialog box once or create the property by using the CreateProperty method and append it to the Properties collection of the Database object.

Remarks

The StartupForm property is preferred over the OpenForm action in the AutoExec macro. Because Microsoft Access runs the AutoExec macro after it parses the startup properties, your application shouldn't use an OpenForm action in its AutoExec macro if the StartupForm property is set.

If this property is blank, the Microsoft Access default database setting is used (the Database window opens).

This property's setting doesn't take effect until the next time the application database opens.

See Also

AllowBreakIntoCode property, AppIcon property, AppTitle property, CreateProperty method ("DAO Language Reference"), Properties collection ("DAO Language Reference"), StartupMenuBar property, StartupShortcutMenuBar property, StartupShowDBWindow property, StartupShowStatusBar property.

Example

See the AllowBreakIntoCode property example.