Lebans Alternate Bands of Color for Forms in Continuous View

DubaiDave

Registered User.
Local time
Tomorrow, 02:48
Joined
Nov 25, 2008
Messages
69
I am using Lebans wonderful example of alternate colors for my continuous subform.

However, I collapse and expand controls from a main form (setting height to zero) and need to update the subfrom backcolor because it stays at the original height.

I think I need to update using:

fbc.Create
fbc.UpdateScreen

But I have no idea where to put it. I cannot find an event that fires on the sub form (on collapse a control height to zero) and the main form does not recognise these commands (because I am not using them correctly I guess).

Can anybody help?

DubaiDave
 
I'd bet it's because you declare the fbc in subform but main form can't see the fbc because it's "private" to the subform.

One solution is to make the fbc a public variable in the subform and use this syntax from main form:

Me.<MySubFormName>.Form.fbc.UpdateScreen

HTH
 
Banana,

That did the trick.

Thank you very much

DubaiDave
 
Cool. Thanks for reporting back. :)
 

Users who are viewing this thread

Back
Top Bottom