Using the Control Wizards

graphics/microsoft166_1.gif

The Control Wizards help you create controls on your form. Although there are many controls you can create, the procedures for creating each control are quite similar, with minor variations depending on the type of control. For example, when you want to include a list of valid options for a field on a form, you can create either a combo box or list box control. Both controls provide a list from which a user can choose when entering data. The easiest way to create either of these controls is with a Control Wizard, which includes additional sorting options.

Create a List Box or Combo Box

graphics/1_icon.jpg

Display the form in Design view, and then, if necessary, click the Control Wizards button on the Toolbox.

graphics/2_icon.jpg

Click the Combo Box or List Box button on the Toolbox.

graphics/3_icon.jpg

In the Form window, drag a rectangle in the location where you want the control to appear. When you release the mouse button, the wizard dialog box for the selected control appears.

graphics/4_icon.jpg

Specify whether you want the control to get its values from a table or query, from what you type in the box, or from what value is selected in the list or combo box. Click Next to continue.

graphics/5_icon.jpg

If applicable , select the table that contains the values you want displayed in the list or combo box. Click Next to continue.

graphics/6_icon.jpg

Select the field that contains the values you want displayed in control. Click Next to continue.

graphics/7_icon.jpg

Select the first sort list arrow, select a table to sort, and then click the Sort button. If you want, select additional sorts. Click Next to continue.

graphics/8_icon.jpg

Adjust the width of the columns for the list box as necessary. Click Next to continue.

graphics/07inf13.jpg

graphics/9_icon.jpg

If necessary, specify which column contains the value that will be stored in the list box control. Click Next to continue.

graphics/10_icon.jpg

Specify whether you want Access merely to display the column value (for later use to perform a task) or to store the value in a field in a table.

graphics/11_icon.jpg

If you choose to store the value in a field, specify the field.

graphics/12_icon.jpg

Click Next to continue.

graphics/13_icon.jpg

Enter a label for the new control, and then click Finish.

graphics/07inf14.jpg

Did You Know?

You can create a list box with custom values . If you want specific values (rather than values from a table) to populate the list box, click the I Will Type In The Values That I Want option in the wizard's first step, and then enter the values manually when you are prompted by the wizard.

You can create a list box to display a specific record . If you want your list box to cause Access to retrieve records, click the Find A Record On My Form Based On The Value I Selected In My List Box option in the wizard's first step. The wizard then prompts you for the field from which the list box will receive its values. When the list box is added to the form, choosing a specific value causes Access to retrieve the matching record.

You can display Help on customizing the combo box . Click to select the check box at the bottom of the wizard dialog box, where you label your list or combo box.




Show Me Microsoft Office Access 2003
Show Me Microsoft Office Access 2003
ISBN: 0789730049
EAN: 2147483647
Year: 2002
Pages: 318

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