Toggle Buttons

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

How can I get a toggle button to display a hidden subform when pressed, also
how can I get that same toggle button to hide the subform when i have
finished?

If anyone can help?
 
In the declaration section of the form,
dim flag as integer

then, in the click event of the toggle button:

If flag = 0 Then
MsgBox "Clicked in" ' whatever code you want to add, to make a subform
visible, just change visible property to true
flag = 1
Else
MsgBox "clicked out" ' subform.visible= false
flag = 0
End If

HTH
Damon
 
Ignore the last post. A more elegant solution is:

If ToggleName = true Then
MsgBox "Clicked in" ' whatever code you want to add, to make a subform
'visible, just change visible property to true
Else
MsgBox "clicked out" ' subform.visible= false
End If

Damon
 
Back
Top