packing controls on a form

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Before I start a project that will deprive me of food, water, and sleep (not
coffee), does anyone have a routine, or is there a function - like in Java -
to pack controls tightly on a form?

After I disable some controls there are "holes" between them. I need to
tidy that up.

Thanks.
 
David

You're describing a solution ("pack controls tightly on a form").

If you describe the problem, newsgroup readers may be able to offer
alternate approaches, in addition to those who can offer only what you
requested...

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
Thanks Jeff.

My subforms have lots of text/combo controls, and I only want to show those
applicable to the data entry task at hand.

I can make unnecessary controls invisible, but then I have large gaps
between the applicable fields. I'd like to move all those seemingly random
placed controls to make the form a lot more pleasant.

I made some progress! I can actually rearrange the visible controls nicely;
however, now I have a new problem - the associate label doesn't move with the
control like it does in design view. The associated label must be a property
of the control, eh?
 
David

Until set otherwise, the default for a text or combo box control in design
mode on a form is to have an "attached" label control. I don't know how
you're moving the textboxes, so I'm not sure if the attached label control
would follow it.

Here's another idea ... if you have multiple data entry "regimes", could you
create a tab control, a subform for each data entry regime, and put the
subforms each on its own tab control page? That way, your user doesn't have
controls appearing and disappearing, and might have a better sense of how
things are organized...

Just one person's opinion.

Regards

Jeff Boyce
Microsoft Office/Access MVP
 
I got it to work - it's slick, too! Controls are dynamically placed on the
form based on their visibility and tab index. I also keep a table of them
where the user can determine their "on" or "off" status.

Managing different regimes is a good idea, but my requirements are too large
- 16 data sections, 466 data elements, almost unlimited combinations.

If anyone is interested . . .

The label didn't automatically move like it does in design time. As I
looped through all controls on the form (building a table that held my
desired layout) I would note if a label control's parent was a control, or
not. Then, I loop through my table and place controls and their labels
accordingly. I couldn't be happier! I even dynamically place my subforms!
 
Back
Top