Creating an Option Group


10 Minute Guide to Microsoft Access 2002
By Joe Habraken
Table of Contents
Lesson 14.  Adding Special Controls to Forms

Creating an Option Group

Another useful special control is the option group. An option group provides different types of buttons or input boxes that can be used to quickly input information into a form. An option group can use one of the following types of buttons :

  • Option buttons?/b> A separate option button is provided for each choice you supply on the form. To make a particular choice, click the appropriate option button.

  • Check boxes?/b> A separate check box is provided for each item you place in the option group. To select a particular item, click the appropriate check box.

  • Toggle buttons?/b> A button is provided for the response required, which can be toggled on and off by clicking the button.

Option groups work best when a fairly limited number of choices is available, and when you create your option group, you should select the type of button or box that best suits your need. If you have several responses where only one response is valid, use option buttons. If you have a situation in which more than one response is possible, use check boxes. Toggle buttons are used when only one response is possible, and it responds to a yes or no type question. The option button is then turned on or off with a click of the mouse.


Other Options You can create a series of option buttons or check boxes using the Option Group button, or you can opt to directly create option buttons or check boxes by clicking the required button (the Option button or the Check Box button, respectively) on the Toolbox.

To create an Option Group control (you will create a control that uses option buttons), follow these steps:

  1. Make sure that the Control Wizards button in the Toolbox is selected.

  2. Click the Option Group button on the Toolbox. Your mouse pointer changes to show the Option Group icon.

  3. Drag your mouse pointer on your form to draw a box where you want the option group to appear. When you release the mouse button, the wizard starts.

  4. The wizard prompts you to enter the labels you want for each button (or check box or toggle button), as shown in Figure 14.6. You will need a label for each button that will appear in the group. These labels should be the same as the type of data you would normally insert into the field for which you are building the option group (which is specified in step 7). Enter the labels needed, pressing Tab after each one; then click Next .

    Figure 14.6. Enter the labels you want for each option here.

  5. On the next screen, you can select one of the labels that you input in step 4 as the default choice for the option group. Specify the label, and then click Yes, the Default Choice Is . Or click No, I Don't Want a Default As the Other Possibility . Then click Next.

  6. On the next screen, the wizard asks what value you want to assign to each option (such as 1, 2, and so on). These values provide a numerical equivalent for each label you listed in step 4 and are used by Access to store the response provided by a particular option button or check box. You should use the default values that Access provides. Click Next to continue.

  7. On the next screen, you decide whether the value that you assigned to each of your option labels is stored in a particular field or saved by Access for later use. Because you are using the option group to input data into a particular field, be sure the Store the Value in This Field option button is selected. This stores the data that the option group provides in a particular field. Select the field from the drop-down list provided. Then, click Next to continue.

  8. On the next screen, select the type of control (option button, check box, or toggle buttonsee Figure 14.7) you want to use and a style for the controls; then click Next .

    Figure 14.7. You can choose different input controls for your Option group.

  9. On the last screen, type a label for the new control. Then click Finish.

Your new Option control appears on the grid area of the form. All the different option values that you entered appear in the control. When you switch to the Form view to enter data, you can use the various option buttons or check boxes to select an actual value for that particular field.


10 Minute Guide to Microsoft Access 2002
10 Minute Guide to Microsoft Access 2002
ISBN: 0789726319
EAN: 2147483647
Year: 2000
Pages: 160
Authors: Joe Habraken © 2008-2017.
If you may any questions please contact us: