I have an option group with 2 buttons in it, yes and no. It is set to default to No, but if someone hits Yes I want it to enable or turn on the next option group. Would just simply changing visible status disable it? Because I have a series of codes set up based on the second option group which read as:
I do not want these to be visible if the inital option group is still set to no. If anyone could shed some light on this I'd appreciate it, or if there is a better way to code what I already have into something more condensed that would be cool as well
Just starting out using access so i'm a bit lost.
Code:
Private Sub NumberOfAdditionalSites_Option1_GotFocus()
Me.AdditionalSitesLabel1.Visible = True
Me.AdditionalSitesText1.Visible = True
End Sub
Private Sub NumberOfAdditionalSites_Option1_LostFocus()
Me.AdditionalSitesLabel1.Visible = False
Me.AdditionalSitesText1.Visible = False
Me.AdditionalSitesLabel2.Visible = False
Me.AdditionalSitesText2.Visible = False
Me.AdditionalSitesLabel3.Visible = False
Me.AdditionalSitesText3.Visible = False
Me.AdditionalSitesLabel4.Visible = False
Me.AdditionalSitesText4.Visible = False
Me.AdditionalSitesLabel5.Visible = False
Me.AdditionalSitesText5.Visible = False
Me.AdditionalSitesLabel6.Visible = False
Me.AdditionalSitesText6.Visible = False
End Sub
Private Sub NumberOfAdditionalSites_Option2_GotFocus()
Me.AdditionalSitesLabel1.Visible = True
Me.AdditionalSitesText1.Visible = True
Me.AdditionalSitesLabel2.Visible = True
Me.AdditionalSitesText2.Visible = True
End Sub
I do not want these to be visible if the inital option group is still set to no. If anyone could shed some light on this I'd appreciate it, or if there is a better way to code what I already have into something more condensed that would be cool as well