How to "cover up" Object or Subform?

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

Guest

Hi all,

I've made a box with solid color. I intend to use the box to cover up all
the contents "underneath", and the box's visibility property can be toggled
on or off using a command button.

But the problem is the box cannot cover up things like Object or Subform
(i.e. they'd always appear on top of the box).

I thought about turning Object and Subform invisible as an alternative
method around this, but I'd really prefer using the box. So how can I make
the box work??

Regards,
Sam
 
Sam Kuo said:
Hi all,

I've made a box with solid color. I intend to use the box to cover up all
the contents "underneath", and the box's visibility property can be toggled
on or off using a command button.

But the problem is the box cannot cover up things like Object or Subform
(i.e. they'd always appear on top of the box).

I thought about turning Object and Subform invisible as an alternative
method around this, but I'd really prefer using the box. So how can I make
the box work??

Regards,
Sam

AFAIK you can't, subforms are always at the top of the z-order.
 
What you can do is use put an indentifier in the 'Tag' property of all of
the items that you want to hide in one go then use similar code below:

For intCount = 0 To Me.Controls.Count - 1
If Left(Me.Controls.Item(intCount).Tag, 1) = "H" Then
Me.Controls.Item(intCount).Visible = blnHideToggle
End If
Next

This saves having to hide each and every item
 
Back
Top