I have a Form in access that contains several subforms. One of these subforms is set by default to not be visible, and I have it coded to make that subform visible if a textbox elsewhere in the form contains a certain value.
This subform (the one that can be either visible or not, depending on the text box's value) is at the bottom of the form. When it is invisible, there is a lot of empty space at the bottom of the "Detail" section of the form. I would like the "Detail" section to automatically shrink when the subform is invisible, and go to the "normal" height when the subform is visible.
Is there a way to do this programmatically with VBA? I was thinking I could set the height of the Detail section in the OnCurrent event for the form, and then have code somewhere that changes the height depending on the presence or absence of the subform. Is there any way to do this?