Grouping items and moving based on subform opening

  • Thread starter Thread starter Michael Mahaney via AccessMonster.com
  • Start date Start date
M

Michael Mahaney via AccessMonster.com

Hi,
I have a subform that, unless a certain value in a combobox is selected,
remains invisible. Under this subform are other fields that will need to
be filled in regardless of the subform. My question is, is there a way to,
if the subform is opened (made visible), create code that will group the
items that follow the combo box and then move them when the subform is
opened so that the subform does not cover them? Otherwise I have to move
each control and label individually.

Thanks,
Michael
 
It depends on your situation.

Suggestion 1 would be to put all of the 'definitely visible' controls in the
form footer, with the subform in the main section, and then hide the section
where not required. Not always going to be feasible to do it that way.

Suggestion 2 would be to add a specific value to the tag property of each of
those 'definitely visible' controls and do something like...

for each ctl in me.controls
if ctl.tag="specific value" then
ctl.top=ctl.top-1234
endif
next

Suggestion 3 - put all of those controls onto another control - probably a
tab control with the style set to None - and then just move the tab control.
 
Back
Top