Access Fantastic Features – Startup Options: Navigation Form and AutoExec Macro
A split database will very often use a Navigation Form on the front-end as the entry point for users. A good idea is to display the Navigation Form by default each time a user opens the database. This makes it easy for users to switch between the various forms and reports in the database without affecting the data tables stored and protected on the back-end. This blog will explain a simple process of creating a Navigation Form by adding buttons to display forms and reports and then configuring options to display the Navigation Form at startup instead of the navigation pane. In addition, a brief discussion will describe a more advanced process of Navigation Form design that opens database objects (including queries) and shows a message (if preferred) at startup.
Creating a Simple Navigation FormTo do this:
- Click the Create tab.
- In the Forms group, click Navigation and choose a layout option.
- Drag forms and reports from the Navigation Pane and drop on the “Add New” tab.
Setting Startup OptionsTo do this:
- Click File, then Options.
- Select Current Database.
- From the “Display Form” dropdown list, choose the correct form.
- Under “Navigation”, uncheck “Display Navigation Pane”.
- To prevent users from getting into Layout view or Design view, you may also want to uncheck “Allow Full Menus” and “Allow Default Shortcut Menus” and “Use Special Access Keys”.
- Click OK to close Options. Click OK to close Message.
- Reopen the database to see changes.
An Alternative Method (Advanced)A more advanced process of Navigation Form design includes adding labels and buttons manually, assigning macros to those buttons that open database objects (including queries), and creating an AutoExec macro for startup display options including a message if preferred. This method gives you more control and flexibility. To do this:
- Create a blank form in Design view.
- On the Design Tab in the Controls group, add labels and name each label appropriately.
- Add a button, use the Command Button Wizard to assign an applicable macro (i.e. to open the object) to the button, and name the button Repeat as often as necessary.
- Save the form.
Using the AutoExec MacroTo do this:
- Create a macro in Design view.
- Enter the actions and set the arguments.
- Save the macro as “AutoExec”. Important: It must be named AutoExec to work.
- Close and reopen the database to verify that the macro runs properly. The Navigation Form and the Welcome message should open. Click “Enable Content” to close Security Options.
- You may want to uncheck “Display Navigation Pane” in Options as described above. To prevent users from getting into Layout view or Design view, you may also want to uncheck “Allow Full Menus” and “Allow Default Shortcut Menus” and “Use Special Access Keys”.
This is the first blog article in a three-part Access series. Be sure to watch for future blog articles in this Access series. The next topic will feature Terrific Tips and Tricks and then Outstanding Options. NOTE: There will not be a Lunch and Learn for this series of blogs. For more information about these and similar features, take an Access Class from Centriq. For course descriptions and dates, see our website here. In addition, if you would like more information about Access or other training classes available, contact a Centriq Training Advisor online or at 913.322.7062 for assistance.