Show or Hide forms (Help needed fast)

  • Thread starter Thread starter thorntonr728
  • Start date Start date
T

thorntonr728

How do I create a command button or toggle button to show/hide
subforms?
Or is there some kind of a macro that you could share that will do
that?
 
Me.SubformControlName.Visible = False to hide it and
Me.SubformControlName.Visible = True to show it.

In a case like this, I usually use one command button something like this.
Assuming the sub form will be visible when the form is opened, I start with
the Caption of the command button set to "HIDE". Then in the click event:

Me.SubformControlName.Visible = Not Me.SubformControlName.Visible
Me.cmdShowHide.Caption = Iif(Me.SubformControlName.Visible, "HIDE", "SHOW")
 
Back
Top