How to disable a subform?

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

Guest

I have a need to disable a subform upon certain condition. How can I do it?

I have a parent form with main form and two subforms. When the parent form
opens, depending on certain conditions, I would like one of the subforms not
to appear.

Thank you very much,
-Me
 
Me said:
I have a need to disable a subform upon certain condition. How can I do it?

I have a parent form with main form and two subforms. When the parent form
opens, depending on certain conditions, I would like one of the subforms not
to appear.


You probably just want to make the subform control
invisible:

If <some condition> Then
Me.subformcontrol.Visible = False
Else
Me.subformcontrol.Visible = True
End If

Or, if the condition is simple,

Me.subformcontrol.Visible = <some condition>
 
Hi Marshall,

I get error for Me.subformcontrol.Visible = false

It says the subformcontrol is not found.

Any ideas? I did try a few other things but nothing seems to work.

Thank you very much,
-Me
 
You need to replace "subformcontrol" with the actual name of
the subform **control** (on the main form).
 

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

Back
Top