Tuesday, January 26, 2010

Working With Menus and Toolbars

Creating Custom Toolbars

You should create custom toolbars for all your forms. These custom toolbars should contain functions specific to the current form and your application in general. To create a custom toolbar

1. Select View: Toolbars from the database window's menu bar to display the Toolbars dialog.
2. Click on the New Button.
3. Enter the name for your custom toolbar and click on OK.
Your custom toolbar is now shown on the list of toolbars along with all of Access's built-in toolbars. You can now edit your custom toolbar just as you would edit a built-in toolbar.

Hiding and displaying toolbars
After you have defined all the toolbars for your application, you need to control when and which toolbars are shown. Toolbars can be hidden or shown at any time using the ShowToolbar macro action or the ShowToolbar method in VBA.


CREATING CUSTOM TOOLBARS IN ACCESS 2007
Open and use an earlier version database that contains custom toolbars
1. Click the Microsoft Office Button , and then click Open.
The Open dialog box appears.
2. Use the Look in list to locate your legacy database (an .mdb or .mde file), and then click Open.
Office Access 2007 opens the earlier version database. The database objects — the tables, forms, reports, and so on — appear in the Navigation Pane. If you set a form, switchboard, or other object to appear on startup, that object also appears in the Navigation Pane. Also, if you created any custom toolbars or menu bars, they appear in the Add-Ins tab as one or more groups. Each group uses the name originally assigned to the custom toolbar or menu bar.
3. Click the Add-Ins tab.
Your custom toolbars appear as one or more groups, and you can use them when doing so is logical. For example, suppose that one of your custom toolbars contains the Print Relationships command. Access does not enable that command until you display the relationships for the open database.