Toggle Buttons

W

Workshop

How can I get a toggle button to display a hidden subform?

What is the code for this, and where do I put it?

If any one can help?
 
J

Jerry Porter

Say your subform object is named "frmSub" and your toggle button is
named "tglShowSubform". Then you could put the following code in the
click event of the toggle button:

Private Sub tglShowSubform_Click()
Me!frmSub.Visible = Me!tglShowSubform
End Sub

If the toggle button is pressed in, it's value is True, and the subform
is made visible. Otherwise, not.

Jerry
 
Top