Show or Hide forms (Help needed fast)

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?
 
G

Guest

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")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top