I want to store the information via a form rather then inputing it into a
table. That way I can be assured there is not typo's down the line.
Currentley I am using the below code pasted at the bottom but I think all
"IF" statements are being ignored. txtValues is the intermediate invisable
txt box that pipes the values to the field associated with the option group.
____________________________________________________________
Private Sub Frame37_AfterUpdate()
Select Case [Frame37]
Case 1
Me![txtValues] = "Meters"
Case 2
Me![txtValues] = "Feet"
Case 3
Me![txtValues] = "Fathoms"
Case 4
Me![txtValues] = "Feet / Fathoms"
Case 5
Me![txtValues] = "Feet / Meters"
If Frame37 = 1 Then
Me.Option40.Enabled = True
Me.Option42.Enabled = False
Me.Option44.Enabled = False
Me.Option46.Enabled = False
Me.Option48.Enabled = False
ElseIf Frame37 = 2 Then
Me.Option40.Enabled = False
Me.Option42.Enabled = True
Me.Option44.Enabled = False
Me.Option46.Enabled = False
Me.Option48.Enabled = False
ElseIf Frame37 = 3 Then
Me.Option40.Enabled = False
Me.Option42.Enabled = False
Me.Option44.Enabled = True
Me.Option46.Enabled = False
Me.Option48.Enabled = False
ElseIf Frame37 = 4 Then
Me.Option40.Enabled = False
Me.Option42.Enabled = False
Me.Option44.Enabled = False
Me.Option46.Enabled = True
Me.Option48.Enabled = False
ElseIf Frame37 = 5 Then
Me.Option40.Enabled = False
Me.Option42.Enabled = False
Me.Option44.Enabled = False
Me.Option46.Enabled = False
Me.Option48.Enabled = True
Else
Me.Option40.Enabled = True
Me.Option42.Enabled = True
Me.Option44.Enabled = True
Me.Option46.Enabled = True
Me.Option48.Enabled = True
End If
End Select
End Sub
Jeff Boyce said:
Are you saying that your radio buttons/option group isn't connected to any
fields?
If you worked out the code to load the hidden text box from the option group
choice, couldn't you also add code that reads that hidden textbox and sets
the option group?
Would it be any simpler if you just stored the option group button value
instead of the circuitous
write-to-hidden-text-store-to-underlying-text-field process?
In fact, storing the option group value (1, 2, 3...) instead of a longer,
character based string would seem to be not only easier but take less room.
What was the reasoning that led to storing text instead?
Regards
Jeff Boyce
Microsoft Office/Access MVP
HI, I created an option group with radio buttons on a form to input data.
I
then pasted in some "After Update (Case ?, After Update, Event Procedure)
code" by piping the numeric case to an intermediate txt box not shown.
This
stored the txt in the desirec field rather then a numeric value. My only
problem is that after I did this my radio button's stoped working. So,
even
though it works the user will have no feedback that he actually did store
the
right option. Any help on getting my radio buttons working so that I can
input a slew of data and learn something would be greatley appreciated.