Question : Toggle Buttons changing textbox value in access 2007

I created a form in Access 2007. I have 4 toggle buttons on it. tgl1, tgl2, tgl3, and tgl4 located in an option group (grpMenuSelection). What i would like is when clicking on the different toggle buttons meking the value in option group change to 1,2,3, or 4 and change the textbox value  to  the toggles tag. THis is to be done in code builder

The form has the following controls
Toggle Buttons --> tgl1, tgl2, tgl3, tgl4
Option Group -->grpMenuSelection
Text Box --> txtMenuHeading


Answer : Toggle Buttons changing textbox value in access 2007

or

Private Sub grpMenuSelection_AfterUpdate()
Me.txtMenuHeading = Me("tgl" & grpMenuSelection.Value).Tag
End Sub

Random Solutions  
 
programming4us programming4us