Access 2013 All-in-One For Dummies
Book image
Explore Book Buy On Amazon

You can create an unbound form that appears when you open an Access 2013 database. Follow these steps to make your new form and the macro that will open the form automatically:

  1. Create a new form by clicking the Form Design button in the Forms group on the Create tab of the Ribbon.

    Access opens a form in Design view.

  2. Save the blank form by clicking the Save button on the Quick Access toolbar or by pressing Ctrl+S.

  3. In the Save As dialog box, type a name for the form, and click OK.

    Call the form something like Main Menu. Leave the form open; you make buttons for it later.

    Now you’re ready to make the AutoExec macro that opens the form automatically.

  4. Create a new macro.

    A blank macro appears.

  5. Add an OpenForm action to the macro.

  6. Set the Form Name argument to the name of the form you just created (Main Menu).

    To do so, click the Form Name argument, click its down arrow, and choose the form from the drop-down menu that appears.

  7. Close the macro, click the Yes button to save it, and name it AutoExec.

    You have to name your macro AutoExec if you want the macro to run automatically each time you open the database.

  8. Create another macro by clicking the Macro button in the Macros & Code group on the Create tab of the Ribbon.

    Your main-menu form needs a macro to contain the submacros your buttons will run. You could make all your buttons by using the Command Buttons Wizard, which stores its submacros as embedded macros, but if you want to make your own submacros for your buttons, you can store them in the macro you create here.

  9. Click the Save button or press Ctrl+S to save the new macro.

  10. Type a name for the macro, and click OK.

    You don’t have to give the macro the same name as the main-menu form — but you’ll find yourself less confused if you do! If you took the advice in Step 3, name the macro Main Menu or Main Menu Form.

  11. Click the tab for the Main Menu form so that you can start adding buttons.

    Now you’re ready to return to your main-menu form (the one you created back in Step 1 — remember?) and add command buttons.

The form is ready and appears when you open the database; all it needs is buttons!

About This Article

This article is from the book:

About the book authors:

Alison Barrows is the author or coauthor of several books about Access, Windows, and the Internet. Joseph Stockman is an 18-year software designer who has authored or coauthored five Access programming books. Allen Taylor is a 30-year veteran of the computer industry and the author of over 20 books.

This article can be found in the category: