Access s Control Wizards, Builders, and Toolbars

Access's Control Wizards, Builders, and Toolbars

Access provides a number of features to aid you in designing and using more complex forms. Three of these features Control Wizards, Builders, and customizable toolbars are described in the three sections that follow.

Access Control Wizards

Much of the success of Access is attributable to the Form Wizard, Report Wizard, and Chart Wizard that simplify the process of creating database objects. The first wizard appeared in Microsoft Publisher, and most of Microsoft's productivity applications now include a variety of wizards. Chapter 14, "Creating and Using Access Forms," introduced the Form Wizard; the Report Wizard is discussed in Chapter 16 and the Chart Wizard is described in Chapter 18, "Adding Graphs, PivotCharts, and PivotTables." In this chapter, you're introduced to a Control Wizard each time you add a control for which a wizard is available.

Access Builders

Builders are another feature that makes Access easy to use. You use the Expression Builder, introduced in Chapter 5, "Working with Jet Databases and Tables," to create expressions that supply values to calculated controls on a form or report. The Query Builder creates the Jet SQL or Transact-SQL statements you need when you create list boxes or combo boxes whose Row Source property is an SQL statement that executes a select query. The Query Builder is described in the "Using the Query Builder to Populate a Combo Box" section near the end of this chapter.

Customizable Toolbars

The preceding chapters demonstrated that Access toolbars include many shortcut buttons to expedite designing and using Access database objects. Access 2003, like most other contemporary Microsoft applications, lets you customize the toolbars to your own set of preferences. Access stores customized toolbar preferences in System.mdw. Toolbars that you create yourself, called command bars are stored in a hidden system table MSysCmdbars in each database.

By default, the Toolbox is a floating toolbar. To anchor the Toolbox, also called docking the toolbar, follow these steps:

  1. Press and hold down the mouse button while the mouse pointer is on the Toolbox's title bar, and drag the Toolbox toward the Form Design toolbar. When the Toolbox reaches the toolbar area, the dotted outline changes from a rectangle approximately the size of the Toolbox into a wider rectangle only as high as a toolbar.

  2. Release the mouse button to change the Toolbox to an anchored toolbar positioned below the standard Form Design toolbar.

Tip

You can anchor or dock a toolbar to any edge of Access's main window. Press and hold down the mouse button on an empty area of the toolbar (not covered by a button), and drag the toolbar until its outline appears along the left, right, or bottom edge of the window. If you drop the toolbar within the confines of Access's main window, it becomes a floating toolbar. In addition, double-clicking the title bar automatically docks a toolbar to its last docked position.


Add or Delete Toolbars

You can add or delete buttons from toolbars with the Customize Toolbars dialog. To add form design utility buttons to the Toolbox toolbar (whether it's docked or floating), do the following:

  1. Choose View, Toolbars, Customize to display the Customize dialog. Alternatively, click the down arrow of the Toolbox's title bar, choose Add or Remove Buttons from the context menu, and select Customize from the button list.

    Tip

    You can also open the Customize dialog by right-clicking any part of a toolbar and choosing Customize from the context menu.

  2. Click the Commands tab, and select Form/Report Design from the Categories list. The optional buttons applicable to form design operations appear in the Commands list, as shown in Figure 15.2.

    Figure 15.2. Add Align to Grid and other Form/Report Design toolbar buttons to the Toolbox with the Customize dialog.

    graphics/15fig02.jpg

  3. graphics/sizing_buttons.gif The most useful optional buttons for form design are control alignment and sizing buttons. Click and hold down the mouse button on the Align to Grid command, drag this button to the Toolbox toolbar, and drop it to the right of the Rectangle button. The right margin of the Toolbox toolbar expands to accommodate the new button (if you customize the Toolbox while it's floating, the window expands to accommodate the new button). You can drag the Align to Grid button slightly to the right to create a gap between the new button and the Rectangle button.

  4. graphics/size_to_fit.gif graphics/control_alignment.gif graphics/align_left.gif Repeat step 3 for the Size to Fit, Size to Grid, and Align Left commands, dropping each button to the right of the preceding button. You now have four new and useful design buttons available in your Toolbox.The Customize dialog for toolbars provides the following additional capabilities:

  • To remove buttons from the toolbar, open the Customize dialog; click and drag the buttons you don't want, and drop them anywhere off the toolbar.

  • To reset the toolbar to its default design, open the Customize dialog, and click the Toolbars tab. In the Toolbars list, select the toolbar you want to reset, and click the Reset button. A message box asks you to confirm that you want to abandon any changes you made to the toolbar.

  • To create a button that opens or runs a database object, open the Customize dialog, display the Commands page, and scroll the Categories list to display the All Objects items. When, for example, you select All Tables, the tables of the current database appear in the Commands list. Select a table name, such as Employees, and drag the selected item to an empty spot on a toolbar. The ScreenTip for the new button displays Open Table 'Employees'. (If you select All Macros and drag a macro object to the toolbar, the button you add runs the macro when clicked.)

  • To substitute a different image for the picture on the buttons, open the Customize dialog. Right-click the button you want to change (on the toolbar, not in the Customize dialog) to display the button shortcut menu. Click Change Button Image to display the Change Button Image dialog. Click one of the images offered. To edit the button's image, click Edit Button Image.

  • To create a new empty toolbar that you can customize with any set of the supplied buttons you want, open the Customize dialog and select Utility 1 or Utility 2 on the Toolbars page. If there's space to the right of an existing toolbar, the empty toolbar appears in this space. Otherwise, Access creates a new toolbar row for the empty toolbar. The Utility 1 and Utility 2 toolbars and the changes you make to them are available in any Access database you open.

  • To create a custom toolbar that becomes part of your currently open database, open the Customize dialog and click New on the Toolbars page. The New Toolbar dialog appears, requesting a name for the new toolbar (Custom 1 is the default). Access creates a new floating tool window to which you add buttons from the Commands page of the Customize dialog. You can anchor the custom tool window to the toolbar, if you want.

  • To delete a custom toolbar, open the Customize dialog, select the custom toolbar on the Toolbars page, and click the Delete button. You are requested to confirm the deletion. The Delete button is disabled when you select one of Access's standard toolbars in the list.

As mentioned earlier, custom toolbars to which you assign names become part of your database application and are stored in the current database file; they are available only when the database in which you store them is open. Built-in Access toolbars that you customize are stored in System.mdw and are available in any Access session.



Special Edition Using Microsoft Office Access 2003
Special Edition Using Microsoft Office Access 2003
ISBN: 0789729520
EAN: 2147483647
Year: 2005
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net