views:

26

answers:

1

I have a form with a subform on it. If subform contains no records, it's visible property is false. In that case, I'd like the outer form to shrink so that there isn't a big empty space where the subform was.

The long way to do this would be by setting the position for all the controls on the form based on whether the subform is visible. However, is there an easier way to do this (maybe with the can grow/ can shrink property)?

+1  A: 

Can grow/can shrink does not apply to forms. But for a superquick solution, try putting your subform in the footer of the main form. You can then quickly make your footer visible or not depending on the subform contents.

iDevlop
Great idea- thanks!
dmr