Hide fields of a subform based on main form

ppataki

Registered User.
Local time
Today, 02:38
Joined
Sep 5, 2008
Messages
267
Dear All,

I have a main form with a subform, both in Datasheet view
I use the little + sign to expand the main form in order to see the subform

If a control on my main form has a specific value I would like the subform to hide certain fields (datasheet view!) when expanded

I tried using
onOpen event
if me.parent!control="something" then
me.field.visible=false
end if

but this does not work

Could you please advise?
Many thanks :)
 
I don't use datasheets, but I believe you have to use ColumnHidden instead of Visible.
 
Thank you
But now I have another issue: what is the event that is triggered when expanding a subdatasheet? - as I would need to use the ColumnHidden property at that event
Many thanks!!
 
I'm not sure, as I don't use them (don't like the look or lack of control). The Current event is fired when you change records, so you could try there.
 
Thank you, I will try that!
Just out of curiosity, what else do you use instead of subdatasheets?

Cheers
 
I would typically have a main form displaying the "one" side of a relationship, and a continuous subform displaying the "many" side.
 

Users who are viewing this thread

Back
Top Bottom