Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Hiding Subforms

Status
Not open for further replies.

Sandman007

Programmer
Jun 20, 2001
47
US
When a certain value is set to true, I would like to hide a subform in my main form.

When using the following code:
[Forms]![Customer Information].[Usage Based Aggregate subform].hide

I get the following error:
Object doesn't support this property or method

Can anyone suggest different code to hide a subform within a form?
 
In the after_update event of the control you wish to trigger the visible/invisible property include the following code:

If me.txtControl = True Then
me.SubformName.Visible = False
Else
me.SubformName.Visible = True
End If


James Goodman
 
Hi!

You can make the subform control invisible:

[Forms]![Customer Information]![YourSubformControl].Visible = False

Note that, in the third set of brackets, you will need the name of the subform control, not the name of the subform itself.

hth

Jeff Bridgham
bridgham@purdue.edu
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top