The Access Wizard Newsletter
Tips, Tricks, and Traps for Access Users and Developers.

Herding Cats and Controls – It's Not an Easy Thing to Do


Have you ever tried herding cats?  I haven’t and I hope I never have to. It seems to me that herding cats must be one really, really difficult problem. They all have their own minds, they want to go their own way and do their own thing, and they have no interest in cooperating or in acting as a group.

So once you get them in place, it would be really nice to make sure that they moved together as a group and don't go straying here, there, and everywhere.
In a similar way, in Microsoft Access, if you have a bunch of controls that you have taken time to carefully place on form or report, you would like them to stay together. Life wold be much easier if you move them as a group. That is the focus of this month's Wizard.

The Group Control

After you have taken the time to get a bunch of controls in a form or report exactly right, you want to be sure that, if you have to move the group of controls, all of them go along for the ride.

You have probably experienced the problem of working really hard to get things just right in a form with a complicated group of controls. If you are doing things the easy way, you will use the tools I talked about over the last couple months in the 2014 June and July Wizards, where you select a group of  controls and then align and space them so that they look neat.

Say that you want to move them as a group. There are several ways you can select them, including lassoing the controls, selecting them individually along with the control and shift buttons, or using ruler techniques. You can get more detail on these techniques from the February 2011 Wizard.  These tools really come in handy to get things just right.

But have you ever experienced situation where you try to move a whole group but you leave one or two controls behind? Or maybe you had the experience of inadvertently clicking a control while you move your mouse and then your group of controls gets messy.  You can manually get them back in place, but it can be really annoying and tedious. One way to make this process easier is to set of controls in place and have them all move together as a group.

Consider the picture below. Here we have gotten things just right; we want everything to stay put relative to the other controls.

To do this from the form view, click on the arrange tab of the form design tools ribbon, then click on the size/space button in the sizing and ordering group.  You will see the size, spacing, grid, and group drop-down, as shown below.

At the bottom of the drop-down, you will see the group and ungroup options. To treat a group of controls as a single element, select all of the controls that you would like to treat as a group and click on the group option. Once you've done that, click on any member of the set of controls that you just grouped together and you will find that they all get selected as a group. From there, you can freely move them around wherever you would like them to be.

If you find that you have to move one of them independently of the others, just click on the group then click on the ungroup button.



Using this group command is another one of those tricks that make designing forms and reports a whole lot easier. When you do this after having taken the trouble to get things just right, you will avoid the problem of trying to chase down cats going astray or single controls going off their position within the group. Going forward, you can select an element within a  group and the entire group will be selected.

Tip of the Month: How to Shorten or Lengthen a Line — A Shortcut Key

When you are creating a line in a form or report, sometimes you want to tweak the line length. You can, of course, do this by selecting the line with your mouse, and dragging the end of the line. Another more precise way is to set the length explicitly in the length property of the line.

There is yet a third way is do some quick adjustments: Click on the line then hold down the shift key while pressing the left or right arrow key. This will lengthen or shorten line and you can repeat the process to resize the line until you get it where you want it to be. 


Quick Links:

Custom Software Home

Access Wizard Archives

Our Services

© Copyright Custom Software
All Rights Reserved | Westford, MA 01886