G
Guest
Hi,
I have an interesting and extremely annoying problem with my option group!
I have setup an option group with 3 options; “Option 1â€, “Option 2†and
“Option 3â€. These options are not bound to a field as the field must store
these options in pre-determined text format and not numerical (i.e. 1, 2 or
3). Instead I have hidden the bound field “Signoff†and set the options
depending on the value in this hidden field. I have done this through the
forms ‘On Current’ event:
Private Sub Form_Current()
If Me.SignOff.Value = "Option 1" Then
Me.OptionGroup = 1
ElseIf Me.SignOff.Value = "Option 2" Then
Me.OptionGroup = 2
ElseIf Me.SignOff.Value = "Option 3" Then
Me.OptionGroup = 3
Else
Me.SignOff.Value = ""
Me.OptionGroup = 0
End If
End Sub
In order to set the field to the option selected I have set the option
button ‘On Got Focus’ event:
Private Sub Option62_GotFocus()
Me.OptionGroup = 1
Me.SignOff.Value = "Option 1"
End Sub
This works fine, except when I actually set an option button. When I set the
first record’s option button to “Option 1â€, the second option button is
unaffected, however the third record’s option button, which was previously
blank, is now being set to “Option 3†!?!
Please help.
Thanks in advance,
Dave
I have an interesting and extremely annoying problem with my option group!
I have setup an option group with 3 options; “Option 1â€, “Option 2†and
“Option 3â€. These options are not bound to a field as the field must store
these options in pre-determined text format and not numerical (i.e. 1, 2 or
3). Instead I have hidden the bound field “Signoff†and set the options
depending on the value in this hidden field. I have done this through the
forms ‘On Current’ event:
Private Sub Form_Current()
If Me.SignOff.Value = "Option 1" Then
Me.OptionGroup = 1
ElseIf Me.SignOff.Value = "Option 2" Then
Me.OptionGroup = 2
ElseIf Me.SignOff.Value = "Option 3" Then
Me.OptionGroup = 3
Else
Me.SignOff.Value = ""
Me.OptionGroup = 0
End If
End Sub
In order to set the field to the option selected I have set the option
button ‘On Got Focus’ event:
Private Sub Option62_GotFocus()
Me.OptionGroup = 1
Me.SignOff.Value = "Option 1"
End Sub
This works fine, except when I actually set an option button. When I set the
first record’s option button to “Option 1â€, the second option button is
unaffected, however the third record’s option button, which was previously
blank, is now being set to “Option 3†!?!
Please help.
Thanks in advance,
Dave