Creating an Option Group

An option group is helpful if you have a few choices for a field entry and you never enter anything but those few choices. For instance, if you're recording the results of a multiple-choice quiz, the answer to question 5 is always A, B, C, or D—never anything else.

What About "Other" As a Quiz Answer?

If you have a questionnaire in which the respondent can choose A, B, C, or D, or enter his or her own response under "Other," you're better off using a combo box on your form, because a combo box allows for new entries.


An option group can include toggle buttons, option buttons, or check boxes. These are simply different styles; they all do the same thing. You can select only one of the choices shown in an option group. When you select another, the one you originally selected is deselected.

That's Not How Check Boxes Usually Work!

You're right. In almost all Windows programs, check boxes are nonexclusive. You can select as many of them in a group as you like. But in this case, they aren't real check boxes; they're just option buttons that you can style to look like check boxes or toggle buttons if you want.


To create an option group, follow these steps:

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

  2. Click the Option Group button in the toolbox (refer to Figure 15.2). 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. First, you're asked to enter the values you want for each button (see Figure 15.4). Do so, pressing Tab after each one; then click Next.

  5. Choose Yes or No when asked if you want a default choice. If you choose Yes, select the default choice from the drop-down list. (This is the choice that will appear automatically when you use the form.) Then click Next.

  6. When asked what value you want to assign to each option, click Next to continue. You don't need to change the assigned default values.

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

  7. Click Store the value in this field, and choose which field should receive the data from the drop-down list. For instance, I'm entering the various colors a Shetland Sheepdog can be, so I'll select the Coloring field here and click Next.

  8. Click to select a type of control (option button, check box, or toggle button), and a style for the controls; then click Next.

  9. Enter a caption for the option group (in this example, you would use Coloring). Then click Finish. You have created your group.

They're All Marked!

When you're in Form Design view, each option in an option group is selected, just to show that it can be. When you are actually using the form, however (in Form view), only one option in the group can be selected at a time. If you do not select a default option (step 5), all of them will be gray (neither selected nor unselected) for a record until you choose one.


In this lesson, you learned to create list and combo boxes and option groups on your forms. In the next lesson, you will learn how to further improve the look of a form by adding graphics to it.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
18.218.127.141