Using A2003. I've got an option group that has a number of check
boxes. I have coding to clear the option group if the user wishes to
cancel their choice. This coding also clears the rest of the controls
on the form. Snippet of the coding:
<..snipped..>
ElseIf TypeOf oCtrl Is CheckBox Then
oCtrl.Value = False
<..snipped..>
ElseIf TypeOf oCtrl Is OptionGroup Then
oCtrl.Value = 0
I get the error message "You can't assign a value to this object" when
this code hits the first check box in the option group. I assume it's
because the check box is part of the option group.
I tried adding an "..oCtrl is OptionButton" but continued to get the
error.
I take it that the check boxes within the option group have to be
ignored. Is there a way to test the check box and if it belongs to the
option group, then ignore it? Or do I have to refer them by name to
ignore? Something like this:
ElseIf TypeOf oCtrl Is CheckBox Then
<if name of control is CheckXX or CheckYY or ... then ignore
this check box>
Thanks for any help or advice.