A checkbox controls whether a subform is visible. If the checkbox is "true," the subform is visible. The problem is, when I close and reopen the form the subform is no longer visible even though the checkbox is still true. I have to uncheck and re-check the checkbox before the subform becomes visible again. Here's what I'm using:
Private Sub RefBoardCkbx_Click()
If RefBoardCkbx.Value = True Then
[Admin Sep - Awaiting Prelim SubBox].Visible = True
Else
[Admin Sep - Awaiting Prelim SubBox].Visible = False
End If
End Sub
Obviously, there has to be some way for the form to automatically re-run the code everytime it opens--I don't know how to make it do that!
Use the main form's On Load event to make the subform visible when the form opens.
You probably also want to put a check in the check box at the same time.
As a side point, consider whether this version of the click event procedure makes sense to you ...