Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Select a radio button in Options Frame based on combo box selection

Status
Not open for further replies.

jrobin9151

Technical User
Jan 24, 2011
15
US
ACCESS 2003, Installed on a Network. I know this is probably easy to do can't remember it though. I have a combo box with several selections in the dropdown. Further down the form I have an Options group with four radio buttons that I've assigned the numerical value 1-4. When a user selects "Retired" in the combobox of a new record I want value #4 to be the selection in the options frame group of radio buttons. If the user changes to any other selection in the combobox then the options frame group would change back to null or no selection. I know it can be done in VBA but is there an easier way?
 
if the option buttons are inside an option group frame then

Private Sub myCombo_AfterUpdate()
If myCombo = "retired" Then
Me.myOptionframe = 4
Else
Me.myOptionframe = Null
End If
End Sub
 
MajP
Thanks for helping me kick the rust off the pipes. It's been a long while since I've built anything in Access and it
all came back to me. Changed the coding slightly(see below) the radio buttons became a shaded grey when retirment wasn't chosen making it confusing looking. Forcing the value to 0 looks better and I'm thinking will work better with my query later. Thanks again for everything


Private Sub G_L_INT_AfterUpdate()
If Me.G_L_INT = "Retirement" Then
Me.Frame33 = 4
Else
Me.Frame33.Value = 0
End If

End Sub
 
Yes Null is grey, false (0) is empty.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top