Subform manipulation

AndyV

Registered User.
Local time
Today, 21:47
Joined
Apr 24, 2008
Messages
32
I have a form with a number of subforms on it. For each main record, either 1 or more than 1 subform maybe applicable. I have set the subforms visible property to false on the main forms current event, and then loop through a recordset to see which subforms are applicable, and reset the visible property on each applicable subform to true.

This works ok, but now I want to try to set the position of each subform on the main form so that there aren't any nasty gaps where the hidden subforms are.

I am struggling with the logic, because there are 6 subforms, and the if statements could get quite "busy" and messy to understand.

Has anyone got any inspiration that they can pass on, because this must have been done many times before.

Many thanks

Andy
 
You could try and set the .top position to be the .top + .height of the previous sub form

David
 

Users who are viewing this thread

Back
Top Bottom