title | keywords | f1_keywords | api_name | ms.assetid | ms.date | ms.localizationpriority | ||
---|---|---|---|---|---|---|---|---|
OptionGroup object (Access) |
vbaac10.chm10894 |
|
|
aa9e5607-7892-9ab2-dabc-822372b23811 |
03/21/2019 |
medium |
An option group on a form or report displays a limited set of alternatives. An option group makes selecting a value easy because you can choose the value that you want. Only one option in an option group can be selected at a time.
An option group consists of a group frame and a set of check boxes, toggle buttons, or option buttons.
If an option group is bound to a field, only the group frame itself is bound to the field, not the check boxes, toggle buttons, or option buttons inside the frame. Instead of setting the ControlSource property for each control in the option group, you set the OptionValue property of each check box, toggle button, or option button to a number that's meaningful for the field to which the group frame is bound. When you select an option in an option group, Microsoft Access sets the value of the field to which the option group is bound to the value of the selected option's OptionValue property.
Note
The OptionValue property is set to a number because the value of an option group can only be a number, not text. Access stores this number in the underlying table.
An option group can also be set to an expression, or it can be unbound. Use an unbound option group in a custom dialog box to accept user input and then carry out an action based on that input.
- AddColon
- AfterUpdate
- Application
- AutoLabel
- BackColor
- BackShade
- BackStyle
- BackThemeColorIndex
- BackTint
- BeforeUpdate
- BorderColor
- BorderShade
- BorderStyle
- BorderThemeColorIndex
- BorderTint
- BorderWidth
- ColumnHidden
- ColumnOrder
- ColumnWidth
- Controls
- ControlSource
- ControlTipText
- ControlType
- DefaultValue
- DisplayWhen
- Enabled
- EventProcPrefix
- Height
- HelpContextId
- HideDuplicates
- HorizontalAnchor
- InSelection
- IsVisible
- LabelAlign
- LabelX
- LabelY
- Left
- Locked
- Name
- OldBorderStyle
- OldValue
- OnClick
- OnDblClick
- OnEnter
- OnExit
- OnMouseDown
- OnMouseMove
- OnMouseUp
- Parent
- Properties
- Section
- ShortcutMenuBar
- SpecialEffect
- StatusBarText
- TabIndex
- TabStop
- Tag
- Top
- ValidationRule
- ValidationText
- Value
- VerticalAnchor
- Visible
- Width
[!includeSupport and feedback]