Bring to front

D

Dirk Goldgar

Jan said:
Hi,
How do you bring a control on a form "to the front" in VBA.

In design view? Select the control (either by clicking on it or, if
it's hidden, by choosing it in the "Object" dropdown list), and then
click Format -> Bring to Front.

If you mean something else, please explain in more detail.
 
J

Jan

Hi Dirk,
I'm sorry. I didn't explain very well. The form is in form view and
involves several controls that I overlap and I want to bring them to the
front when a certain control has the focus. (I know it doesn't sound like
good design but this is what the client wants).

In a more detailed explanation, when a certain control has the focus, the
corresponding memo field must come to the front for editing etc. Any
thoughts?

Thanks for the prompt response.
Jan
 
R

Rick Brandt

Jan said:
Hi Dirk,
I'm sorry. I didn't explain very well. The form is in form view and
involves several controls that I overlap and I want to bring them to the
front when a certain control has the focus. (I know it doesn't sound like
good design but this is what the client wants).

In a more detailed explanation, when a certain control has the focus, the
corresponding memo field must come to the front for editing etc. Any
thoughts?

I believe you would have to toggle the visible properties instead. I don't
think you can control the Z-Order in normal view.
 
D

Dirk Goldgar

Jan said:
Hi Dirk,
I'm sorry. I didn't explain very well. The form is in form view and
involves several controls that I overlap and I want to bring them to
the front when a certain control has the focus. (I know it doesn't
sound like good design but this is what the client wants).

In a more detailed explanation, when a certain control has the focus,
the corresponding memo field must come to the front for editing etc.
Any thoughts?

Hmm ... If you set the focus to the memo field, it will move to the
front. But I don't think you can move it to the front while still
keeping the focus in some other control. Would Rick Brandt's suggestion
of manipulating its Visible property fulfill your client's requirements?
Or could you do something with a tab control?
 
J

Jan

Dirk and Rick,
Thanks for the advice. I have tried both options and the one best suited
for the form is Rick's. I'll have to work with the visible and invisible
property of each control. It's just tedious.

I had hoped that the command to bring a control to the front could be
executed from the focus of another control in VBA. I looked up the command
and found it: AcCommand ...acCmdBringToFront but can't seem to invoke it
from a control other than the one I want to bring to the front.

Thanks again.
Jan
 

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

Similar Threads

check form open and bring it to front 3
Nested Tab Controls - Bring to Front 9
Bring form to front 1
Bring to front in VBA 8
Bring to front 3
Bring to front in vba 1
Bring to Front 1
Bring to front 3

Top