Resize form based on if subform visible
        Posted  
        
            by dmr
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by dmr
        
        
        
        Published on 2010-04-20T15:09:53Z
        Indexed on 
            2010/04/20
            15:13 UTC
        
        
        Read the original article
        Hit count: 320
        
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)?
© Stack Overflow or respective owner