I have a form that includes a group of 3 radio buttons. Three subforms sit on this main form and I have set their visibility property to false so that they don’t show at start up. The visibility of the subforms is controlled through the radiobuttons , I coded each radio button as follows
Private Sub Option13_GotFocus()
form1.Visible = True
End Sub
Private Sub Option13_LostFocus()
form1.Visible = False
End Sub
Private Sub Option15_GotFocus()
Form2.Visible = True
End Sub
Private Sub Option15_LostFocus()
form2.Visible = False
End Sub
Private Sub Option17_GotFocus()
form3.Visible = True
End Sub
Private Sub Option17_LostFocus()
form3.Visible = False
End Sub
This does have the effect of toggling the visibility of the subforms, the problem is that when the main form first appears one of the subforms is visible even thought I set its Visible property as false. Introducing the radio buttons seems to be affecting the initial visibility of one of the subforms. Initially NONE of the radio buttons is selected. Not sure whats going wrong?
Private Sub Option13_GotFocus()
form1.Visible = True
End Sub
Private Sub Option13_LostFocus()
form1.Visible = False
End Sub
Private Sub Option15_GotFocus()
Form2.Visible = True
End Sub
Private Sub Option15_LostFocus()
form2.Visible = False
End Sub
Private Sub Option17_GotFocus()
form3.Visible = True
End Sub
Private Sub Option17_LostFocus()
form3.Visible = False
End Sub
This does have the effect of toggling the visibility of the subforms, the problem is that when the main form first appears one of the subforms is visible even thought I set its Visible property as false. Introducing the radio buttons seems to be affecting the initial visibility of one of the subforms. Initially NONE of the radio buttons is selected. Not sure whats going wrong?