The Option Button Control

The Option Button control is similar to that of the Check Box control in that it offers the user a selection from a group of possibilities. The difference between the two: the Option Button control gives the user one selection; therefore, when the user selects an Option Button from a group of Option Buttons, a previously selected Option Button is automatically deselected.

Option Button controls are grouped by the container on which they have been added. So no matter how many Option Button controls are added to the form shown in Figure 6.6, only one can be selected at any given time.

Option Button controls grouped by a form.

Option Button controls grouped by a form.

The most common Option Button control properties that you will set (excluding size and appearance properties) include the Name, Caption, and Value properties. The Boolean Value property represents the selection state of the control (selected=true) and is the property most commonly addressed in your VBA code. The Name and Caption properties are typically set at Design Time.

The Click() event is the most commonly used event procedure of the Option Button control. The Click() event is triggered whenever the user changes the state of an Option Button; thus, it is a good location for code that processes the user's change made to the Value property of the control.

Biorhythm Awareness

Biorhythm Awareness

Who else wants to take advantage of biorhythm awareness to avoid premature death, escape life threatening diseases, eliminate most of your life altering mistakes and banish catastrophic events from your life.

Get My Free Ebook


Responses

  • alix fleming
    WHERE ARE THE OPTION BUTTON CONTROLS IN ACCESS?
    7 years ago

Post a comment