I have created a form with an option group containing seven options. I have linked each option to a tab. Thanks to the help of people on this board showing me how to code visible/non-visible, I was able to write logic that hides all tabs except for the option selection:
Private Sub AwardOption_AfterUpdate()
If Me.AwardOption = 1 Then
Me.Heart.Visible = True
Else
Me.Heart.Visible = False
End If
If Me.AwardOption = 2 Then
Me.Ingenuity.Visible = True
Else
Me.Ingenuity.Visible = False
End If
If Me.AwardOption = 3 Then
Me.Clarity.Visible = True
Else
Me.Clarity.Visible = False
End If
...and so on for options 4-7....
My problem is that when you open the form, a random option is selected but all tabs are still visible. It is only when you actually click another option that the rest of the tabs hide. How do I set the form so that when the form opens, no tabs are visible or ideally to set option 1 as default and show its corresponding tab, with the rest of the tabs hidden until their option is selected?
Much thanks for all replies!!!
Private Sub AwardOption_AfterUpdate()
If Me.AwardOption = 1 Then
Me.Heart.Visible = True
Else
Me.Heart.Visible = False
End If
If Me.AwardOption = 2 Then
Me.Ingenuity.Visible = True
Else
Me.Ingenuity.Visible = False
End If
If Me.AwardOption = 3 Then
Me.Clarity.Visible = True
Else
Me.Clarity.Visible = False
End If
...and so on for options 4-7....
My problem is that when you open the form, a random option is selected but all tabs are still visible. It is only when you actually click another option that the rest of the tabs hide. How do I set the form so that when the form opens, no tabs are visible or ideally to set option 1 as default and show its corresponding tab, with the rest of the tabs hidden until their option is selected?
Much thanks for all replies!!!
Last edited: