If you have a very large or complex database with several files and dozens of layouts, the simple task of navigating from one place to the next can become difficult. A button bar can help, but once your database gets really cumbersome, all the buttons you need will take up too much space in a layoutspace you need for real work. When this happens, you can create a Main Menu layout that contains only buttons. The buttons will take you to the most important layouts (like Data Entry) or execute scripts that search or print reports. Each of the other layouts in the database need contain only one button that returns you to the Main Menu.
To create a Main Menu layout
1 .Choose View > Layout Mode (Control+L/Command+L).2 .Choose Layouts > New Layout/Report (Control+N/Command+N).3 .In the New Layout/Report dialog box, type a name for the layout. (We use Main Menu.) Choose "Blank layout" as the layout type (Figure 9.25). Click Finish.
Figure 9.25. Since the Main Menu will contain only buttons, begin with a blank layout.
4 .Drag the Header and Footer parts up until they disappear, since we need only the Body part, then drag the Body tab down to make room for the buttons you're going to add.5 .Follow the steps in "To create a button for a script" earlier in this chapter to add a button to the layout.6 .Select the new button. Holding down the Control/Option key, drag to duplicate the button, changing the labels and scripts for each one (Figure 9.26). Repeat this step as many times as necessary to create the total number of buttons for the layouts and scripts you use frequently.
Figure 9.26. Control - or Option-dragging allows you to create one button and then duplicate it, retaining its size and formatting.
7 .Arrange the buttons on the page and add labels and headings. It's a good idea to group functions logically and consistently so you won't have to waste time later reading every button to find the one you want (Figure 9.27).
Figure 9.27. Group buttons logically to make it easy to use them later.
You now have a layout with buttons that enables you to navigate your database. All that's left is to create a script you can use to link your other layouts back to the Main Menu.8 .Choose Scripts > ScriptMaker (Control+Shift+S/Command+Shift+S). In the Define Scripts dialog box, click New. In the Edit Script dialog box, type a name for the script. (We use Go to Main Menu.).9 .In the step list on the left, double-click Go to Layout. In Script Step Options, choose Main Menu from the Specify drop-down menu (Figure 9.28). Click OK twice.
Figure 9.28. Choose the layout you want to go to when you click the button.
10 .In layouts in the same database file as the Main Menu, follow the steps in "To create a button for a script" earlier in this chapter to add a button to the layout.11 .In the Specify Button dialog box, select Go to Layout from the list on the left and Main Menu from the Specify drop-down menu under Options (Figure 9.29). Label the button Main Menu.
Figure 9.29. Buttons in other layouts will run the Go to Main Menu script.
12 .Copy the new button and paste it on any layout you want to link to the Main Menu.