How do I "Bring to Front" in VBA?

M

M Skabialka

I have a form which is divided into sections where each background is a box.
This makes it easier to manage the info for the user. However there are
some functions I have placed on one of the boxed areas that I don't want all
users to see. I am looking for a setting that will cause this box to use
the "Bring to Font" property, rather than make all of the controls on it not
visible. When I look at the proprties in Intellisense, Bring To Front and
Send to Back are not there. How do I do this?
Mich
 
G

Golfinray

You would probably need to use code on the onclick event of the form to set
me.visible=true or me.visible=false as needed.
 
M

M Skabialka

I have a colored box with a dozen or so buttons and fields on top - I wanted
the box to come to the top for some users and stay behind the buttons for
others. I Googled this issue and have come to the conclusion this is not
possible - Bring to Front and Send to Back are design time features only. I
created an identical box, put it on top and make it visible or not depending
on the user.
 
G

George Nicholson

These aren't object properties per se, they are instructions that the user
interface provides (which evidently set some other GraphicLayer property
that is not exposed).
Docmd.RunCommand acCmdBringToFront
Docmd.RunCommand acCmdSendToBack

However, afaik they will only work while the form is in Design view.
Invoking them while in Form View generates a "..not available now.."
message, so manipulating Visible is the more dynamic solution.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top