K
Kevin
Hi,
I have 4 fields that hold numeric data. I've created a set of command
buttons to act as a quasi-calculator to write numbers to the 4 respective
text boxes, depending on which option button in an unbound option group has
the current focus.
Im my attempt to use an Option Group to determine which of the 4 text boxes
has the focus -- thus is some code I've been trying:
Private Sub FrameAdmin_AfterUpdate()
If Me!FrameAdmin.OptionValue = "1" Then
Me!cboNFLID.SetFocus
ElseIf Me!FrameAdmin.OptionValue = "2" Then
Me!txtYear.SetFocus
ElseIf Me!FrameAdmin.OptionValue = "3" Then
Me!txtRnd.SetFocus
ElseIf Me!FrameAdmin.OptionValue = "4" Then
Me!txtPck.SetFocus
ElseIf Me!FrameAdmin.OptionValue = "5" Then
Me!txtOverall.SetFocus
End If
End Sub
This fails -- I get a run time error 438 object doesn't support this method
or property -- which must mean that I am referencing int eh OprionValue
property incorrectly.
What I am doing wrong> How do I reference the OptionValue property in code?
thanks
I have 4 fields that hold numeric data. I've created a set of command
buttons to act as a quasi-calculator to write numbers to the 4 respective
text boxes, depending on which option button in an unbound option group has
the current focus.
Im my attempt to use an Option Group to determine which of the 4 text boxes
has the focus -- thus is some code I've been trying:
Private Sub FrameAdmin_AfterUpdate()
If Me!FrameAdmin.OptionValue = "1" Then
Me!cboNFLID.SetFocus
ElseIf Me!FrameAdmin.OptionValue = "2" Then
Me!txtYear.SetFocus
ElseIf Me!FrameAdmin.OptionValue = "3" Then
Me!txtRnd.SetFocus
ElseIf Me!FrameAdmin.OptionValue = "4" Then
Me!txtPck.SetFocus
ElseIf Me!FrameAdmin.OptionValue = "5" Then
Me!txtOverall.SetFocus
End If
End Sub
This fails -- I get a run time error 438 object doesn't support this method
or property -- which must mean that I am referencing int eh OprionValue
property incorrectly.
What I am doing wrong> How do I reference the OptionValue property in code?
thanks