wlwebb
asked on
Set Subform's Top Property via VB Code
Hello all!
I have a Form (not a tabbed form this time). On that Form I have 4 subforms. Based upon a Frame option group certain of these subform's will be made visible. However I would like to set the Top property of the subform when the AfterUpdate of the option group is selected.
The Mainform has a header. Where I want the subform Control to appear is at 1.635" down within the Detail section. So I attempted.
Me![subform].Top = (me.formHeader.Height + 1.635)
However, this doesn't work. Is there a way I can set that Subform's Top setting with Code????
I have a Form (not a tabbed form this time). On that Form I have 4 subforms. Based upon a Frame option group certain of these subform's will be made visible. However I would like to set the Top property of the subform when the AfterUpdate of the option group is selected.
The Mainform has a header. Where I want the subform Control to appear is at 1.635" down within the Detail section. So I attempted.
Me![subform].Top = (me.formHeader.Height + 1.635)
However, this doesn't work. Is there a way I can set that Subform's Top setting with Code????
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Glad to help!
Your syntax was fine... but without the conversion your subform was moving by a mere smidgen. :-)
Your syntax was fine... but without the conversion your subform was moving by a mere smidgen. :-)
ASKER
And you ARE in fact correct .... the height didn't need to be in the formula!!!!!
Thanks mbiz