Quick Tip: 4 Ways to Select the Bottom Control in a Stack

There are many situations that call for two (or more) controls to be stacked on top of each other. In those situations, how does one select the bottom control?

Quick Tip: 4 Ways to Select the Bottom Control in a Stack

There are several situations where you may find yourself with multiple controls stacked on top of each other on a Microsoft Access form or report:

When the two controls are the exact same size and in the exact same position, it may seem impossible to select the bottom control in the z-order.  However, there are a few different ways you can do it.

Sample Form

In each example below, we're using a simple form with only two controls:

  • A textbox named Text0
  • A command button named Command1 with Transparent = Yes

The two controls are the same size and occupy the same position on the form.  The command button, Command1, sits above the text box in the z-order.

In each option below, our goal is to select the text box (which is under the transparent command button).

Option 1: Using the Property Sheet Dropdown

If you know the name of the control you want, you can select it from the Property Sheet dropdown control.

If the Property Sheet pane is not visible, you can turn it on via the ribbon (Form Design > Tools > Property Sheet) or via its shortcut key [F4].

Option 2: Temporarily Switch the Z-Order

Sometimes you don't know the name of the control you want.  Or maybe there are so many controls on the form or report that it's inconvenient to search through the dropdown list for the one you want.

With this option you:

  1. Right-click the top control (Command1)
  2. Select Position > Send to Back
  3. Left-click the new top control (Text0)
  4. Make whatever changes to the control you need to
  5. Right-click the new top control (Text0)
  6. Select Position > Send to Back

I don't love this option.  It's a fair amount of extra steps AND you need to be careful to remember to restore the proper z-order of your controls.

Don't worry, there's a better way.

Option 3: Temporarily Resizing the Top Control

This is very similar to the above option.  Instead of changing the control's z-order, we change its size or position.

  1. Left-click the top control (Command1)
  2. Click and drag one of the control handles to make it smaller
  3. Left-click the now-exposed bottom control (Text0)
  4. Make whatever changes to the bottom control you need to
  5. Left-click the resized top control (Text0)
  6. Click and drag one of the control handles to restore its size

Like the previous option, we need to remember to revert a change that we've made to our form design.  That's such an easy thing to forget to do, I really don't like this option much better than Option 2.  It's usually more obvious when you forget to revert a change made to the size of the top control rather than to its z-order.  However, it's not always easy to resize the top control to the exact same size and position it had originally.

Don't worry, there's a better way.

Option 4: Deselect the Top Control

This is my go-to approach, and I don't think it's widely used.

  1. Click and drag from an empty area of the form over the stacked controls (this results in a "Multiple Selection" as seen in the first screenshot above)
  2. Hold down the [Shift] key and left-click the multiple selection
In the above screenshot, I'm clicking and dragging to create the vertical selection rectangle. All controls under the rectangle will be selected when I release the mouse button.

This deselects the top control in the z-order leaving only the bottom control still selected.  

(NOTE: [Shift]-clicking controls toggles inclusion of the clicked control in the selection group.)

Form/Report Selection Behavior

In the screenshot above, notice that I have not fully enclosed the controls I'm trying to select.  This is the default behavior, but it is a configurable setting.

  1. Go to File > Options > Object Designers
  2. Scroll down to Selection behavior under the "Form/Report design view" heading

You can switch this setting to "Fully enclosed" if you are so inclined.  With the "Fully enclosed" option, you will need to draw your selection rectangle completely around the outside of the controls you want to select.

Reader Feedback

Did I leave any options out?  Let me know in the comments below if you have a different trick you like to use to select the bottom control in a group of stacked controls.

All original code samples by Mike Wolfe are licensed under CC BY 4.0