Modifying Access’s built-in toolbars
Just as menu bars are staples for keyboard user’s toolbars are used by mouse-oriented users to quickly execute functions of your applications. Think of toolbars as mouse shortcuts. In general, you should have one toolbar for every menu in your program. When you display a menu you should also display a corresponding toolbar.
A toolbar generally contains shortcuts for functions often used within your application. Each toolbar button should have a corresponding menu item but not all menu items need an associated tool button. Toolbar real estate is usually at a premium, so reserve your tool buttons for the most frequently used functions of a form.
Two types of toolbars are available to you with Access for Windows 95. Microsoft Access’s built-in toolbars and custom toolbars that you create Access includes a number of built-in toolbars that you can modify. If you will always run your application with the full development version of Access this may be the easiest way for you to use toolbars. However, if you are going to distribute you application with the runtime version of Access (the Access ADT) you will not able to display Access’s built-in toolbars; you must create custom toolbars.
Access’s built-in toolbars are easy to customize. As you become more and more familiar with Access, you will find that there are many items on Access’s various toolbars that you almost never use. In addition, there are probably a number of functions you execute frequently that lack corresponding tool buttons. You can make your work more efficient (and make work easier for your application’s user) by modifying the built-in toolbars.
The toolbars dialog box shows you a list of all toolbars in Access. You can use it to:
• Customize an existing toolbar
• Create a new toolbar
• Select color or black-and-white buttons
• Select large or small buttons
• Choose to display tooltips
To customize a toolbar the toolbar must be displayed. To display a toolbar check on the check box next to the toolbar you want to display. When all the toolbars you want to customize are displayed check on the Customize button to display the Customize Toolbars dialog box.
Customizing a toolbar consists of four basic functions:
• Adding buttons to toolbars
• Removing buttons to toolbars
• Moving buttons on toolbars
• Changing the face (image) of toolbar buttons
The Customize Toolbars dialog box consists primarily of two elements:
• A category list
• A view of all buttons or objects for the selected category
The category list shows all available toolbar categories, such as Form or Query Design. When you select a category, Access displays all the defined toolbar buttons for that category. In addition to the standard categories you are also given the opportunity to display all tables, queries, forms, reports and macros. This make it easy to execute a macro or open a form, for example, directly from a toolbar.
Although you cannot run a procedure you have written directly from a toolbar, you can make a tool button execute VBA code by creating a macro that performs a RunCode action that in turn executes your procedure. You can then create a tool button that runs the macro.
Subscribe to:
Post Comments (Atom)

No comments:
Post a Comment