How to get Subforms to appear at the top of a tab

gopherking

Registered User.
Local time
Today, 08:45
Joined
May 26, 2011
Messages
31
Ok, the title is a little confusing so I hope I can clear up any questions with what I have here.

Currently, I have a form with the Tab control on it. Within one of the Tabs, I have 3 Subforms that the visible property is enabled or disabled depending on the content of a text box control on the main form (this works just fine). The problem that I have is that when only the 3rd form (at the bottom of the Tab) is the only one shown, there is a bunch of white space where the other two Subforms were. Is it possible to have the SubForms appear at the top of the Tab if one or two of the other SubForms are not visible?

I guess that it would default all the Subforms to the top of the Tab and then move them down as other Subforms become visible.
 
Rather than just setting them to Not Visible use the condition to change the SourceObject of the subformcontrols. If only the third one is to be shown, make its form the SourceObject of the top subformcontrol and set the other's Visible property to False.

If they need to be different sizes also change the Height and Width properties of the subformcontrol.

This is probably easier than moving them up and down the form using the Top properties but it could also be done that way.
 
Ahhhh ... I see what you're saying. So I see more coding in my future!!! Thanks for the info!
 

Users who are viewing this thread

Back
Top Bottom