Min said:
Thanks for your reply!
If I did not misunderstand, to find the status of the option radio
button is actual check the frame's value see if it equates the value
of the selected option button, am I right? I'll check this later.
Right. If radio buttons, toggle buttons, or check boxes are made part
of an option group, then those controls have no Value property of their
own. Instead, the option *frame's* Value property reflects which of the
mutually exclusive option controls is selected.
Typically, in code one checks for the possible values of the option
frame using code like this:
Select Case Me!optMyGroup
Case 1 ' option 1 was chosen
' ...
Case 2 ' option 1 was chosen
' ...
Case 3 ' option 1 was chosen
' ...
Case Else ' no option was chosen
' ...
End Select
The multi-choice box is the check box, as it allows multi-select more
than one. Now, there is no frame for these check boxes, so, where to
find if it is ticked or not?
If a check box, radio button, or toggle button is placed on a form and
not made part of an option group, then the control does have a Value
property, which will be True (-1) if the control is
checked/ticked/"pushed" and False (0) if the control is
un-checked/un-ticked/"popped".
Typically, one checks a set of mutually independent check boxes (or
other binary-valued controls) using code like this:
If Me!chkChoice1 = True Then
' ... act on choice 1 ...
End If
If Me!chkChoice2 = True Then
' ... act on choice 2 ...
End If
If Me!chkChoice3 = True Then
' ... act on choice 3 ...
End If
Be aware that, in some cases, check boxes can be TripleState, in which
case they may actually have three values: True, False, and Null (which
isn't really a value, but rather the absence of a value).