Link to home
Start Free TrialLog in
Avatar of wlwebb
wlwebbFlag for United States of America

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????
ASKER CERTIFIED SOLUTION
Avatar of mbizup
mbizup
Flag of Kazakhstan image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of wlwebb

ASKER

That was it!!!!!!!!!!!

And you ARE in fact correct .... the height didn't need to be in the formula!!!!!

Thanks mbiz
Glad to help!

Your syntax was fine... but without the conversion your subform was moving by a mere smidgen.  :-)