Conditionally hide a subform

sdebo2

Registered User.
Local time
Today, 13:46
Joined
Mar 12, 2001
Messages
20
I have a sub form (RPTSQueue_subform) on a main form that I would only like only appear when the user click a check box (Queue) on the main form. Below is the code that I am using on the AfterUpdate event of the check box, but it is giving me an error "Run-time error '424': Object required"

If Queue = 1 Then
'UnHide the Queue SubForm
Project_New.RPTSQueue_subform.Form.Visible = True
Else
Project_New.RPTSQueue_subform.Form.Visible = False
End If

Please help me out

Thanks
Scott
 
Scott,

Forms have many properties. Visible is not one of them.

Try:
Project_New.RPTSQueue_subform.Visible = True

which makes the control visible or not visible.

RichM
 
From the main form it should be something like
Me.agnSub.Visible = True
where you subform has been renamed on the property sheet to something more manageable
 
That still gave me the no object error. However when I took out the main form name it worked. The code that worked is below.

RPTSQueue_subform.Visible = True

Thanks for your help

Scott
 
Must try!

This will go on my list of things to try!:)

I mean, to-do list
"Do or do not, there is no try" :D
 

Users who are viewing this thread

Back
Top Bottom