Use the Frame control to group related controls on the form

Green LlilP Blue

Figure 6.19 - The Frame control.

To add a Frame control

® Drag the control from the Control Toolbox to the form.

Controls within the Frame can be easily removed by dragging and deleting.

To add or remove controls from a Frame control

® To add a control, drag the control into the frame. To remove a control, drag it outside the border of the frame, right-click the control, and then choose Delete on the shortcut menu.

To change the caption of the Frame control

1. Right-click the border of the Frame control, and then click Properties on the shortcut menu.

2. In the Caption text box on the Display page, type a new caption for the Frame control.

OptionButton Controls

Use OptionButton controls on a form when you want to give the user a limited number of choices. For example, on the Business Card Request form, OptionButton controls are used to enable users to select the quantity of cards they want, as shown in Figure 6-20.

Figure 6.20 - OptionButton controls on the Business Card Request form.

To specify a caption for an OptionButton control

1. In Design mode, drag the OptionButton control from the Control Toolbox to the form.

2. Click the OptionButton control. When the insertion pointer appears, type a caption for the control.

Set Value Properties for an OptionButton Control

To group OptionButton controls together, you bind the controls to the same field. For example, the OptionButton controls in Figure 6-20 are bound to the Quantity field. When you bind one OptionButton control to a field, all other option buttons in the group are automatically bound to the same field. Option buttons on pages that are not included in a container, such as a Frame or MultiPage control, are grouped together automatically. Option buttons in a Container control are grouped with the option buttons in that container.

To bind an OptionButton control to a field

1. Right-click the control, and then click Properties on the shortcut menu.

2. Click the Value tab.

3. Do one of the following:

® Click New to create a new field. You can create a Currency, Text, or Number field. Choose the type of field to match the data in the control. In this example, the Quantity field is a Number field.

® Click Choose Field, point to User-Defined Fields In Folder, and then click the field to which you want to bind the OptionButton control. In this example, the OptionButton control is bound to the Quantity field. The folder name changes depending on which form is being designed.

When you bind one option button in the group to a field, all option buttons in the group are bound to the same field automatically.

Set the Value property of each option button separately After you bind the option buttons in a group to an existing field, you must set the Value property of each option button separately. The Value property is the value that is written to the field when the option button is selected at run time. This value appears in folder views to represent the option button if it is selected in an item.

To set the Value property of an OptionButton control

1. Right-click the OptionButton control that you want to set the Value property for, and then click Properties on the shortcut menu.

2. Click the Value tab.

3. In the Initial Value text box, type a value for the option button.

To set the initial value of an OptionButton control

1. Right-click the OptionButton control that you want as the default button when the form first appears at run time. Then click Advanced Properties on the shortcut menu.

2. Click the Value cell, and then type True.

3. Click Apply, and then close the Advanced Properties window.

CheckBox Controls

Use CheckBox controls to give the user an On/Off or Yes/No choice, as shown in Figure 6-21. Because check boxes work independently of each other, the user can select any number of check boxes at one time.

Was this article helpful?

0 0

Post a comment