By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
464,642 Members | 1,098 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 464,642 IT Pros & Developers. It's quick & easy.

Show undelying controls

P: n/a
Hi.

I have several controls at the same position. The are made visible one
after the other using the .Visible property.

While in the design view, I see only the upper control. How can I make
underlying controls visible (in the design view)?

TIA

--
Georges

Nov 12 '05 #1
Share this Question
Share on Google+
11 Replies

P: n/a
Georges Heinesch wrote:
I have several controls at the same position. The are made visible one
after the other using the .Visible property.

While in the design view, I see only the upper control. How can I make
underlying controls visible (in the design view)?


.... forgot to add ...

"Send to back" and "Bring to front" (Format menu) doesn't do that for
some reason.

--
Georges

Nov 12 '05 #2

P: n/a
They >are< visible, you just can't see them because your top control covers
them (obviously). You can select them by using the dropdown (combo) in the
Formatting toolbar.
--
Scott McDaniel
CS Computer Software
www.thedatabaseplace.net

"Georges Heinesch" <ne**@geohei.lu> wrote in message
news:3f**********@news.vo.lu...
Georges Heinesch wrote:
I have several controls at the same position. The are made visible one
after the other using the .Visible property.

While in the design view, I see only the upper control. How can I make
underlying controls visible (in the design view)?


... forgot to add ...

"Send to back" and "Bring to front" (Format menu) doesn't do that for
some reason.

--
Georges

Nov 12 '05 #3

P: n/a
Georges,
"Send to back" should work IMO but you need to select the upper control again and again until the
desired control is on top.

However I use a different approach when I need controls at the same position:
I place the controls at the same horizontal location but on different vertical locations (so that
they are still visible in design view).
Let's say we need four controls cbo1, cbo2, cb3 and cbo4 (comboboxes in this case)
You only need a few lines of code on opening your form :
Me!cbo2.Top=Me!cbo1.Top
Me!cbo3.Top=Me!cbo1.Top
Me!cbo3.Top=Me!cbo1.Top

You don't need "Send to back", or "send to front" anymore ...

You can use the same approach for the labels (if needed) or you can only use one label
and change it's caption when you use the visible property.

--
Hope this helps
Arno R

"Georges Heinesch" <ne**@geohei.lu> schreef in bericht news:3f**********@news.vo.lu...
Georges Heinesch wrote:
I have several controls at the same position. The are made visible one
after the other using the .Visible property.

While in the design view, I see only the upper control. How can I make
underlying controls visible (in the design view)?


... forgot to add ...

"Send to back" and "Bring to front" (Format menu) doesn't do that for
some reason.

--
Georges

Nov 12 '05 #4

P: n/a
One way is to write some code that you only execute in design view... one
procedure to offset each the controls enough that you can select it, and
another that will set them all back to the same position. You'll have to
remember to execute it from the Immediate Window... (hmm, I wonder if there
is indeed a way to automate this...).

Larry Linson
Microsoft Access MVP

"Georges Heinesch" <ne**@geohei.lu> wrote in message
news:3f**********@news.vo.lu...
Georges Heinesch wrote:
I have several controls at the same position. The are made visible one
after the other using the .Visible property.

While in the design view, I see only the upper control. How can I make
underlying controls visible (in the design view)?


... forgot to add ...

"Send to back" and "Bring to front" (Format menu) doesn't do that for
some reason.

--
Georges

Nov 12 '05 #5

P: n/a
Scott McDaniel wrote:
They >are< visible, you just can't see them because your top control covers
them (obviously). You can select them by using the dropdown (combo) in the
Formatting toolbar.


I can select them by using the Formatting (Form/Report) dropdown tool in
this toolbox, but the subform doesn't show up in front of the others.
The bottom ones stay hidden for some reason?!?!

--
Georges

Nov 12 '05 #6

P: n/a
Arno R wrote:
"Send to back" should work IMO but you need to select the upper control again and again until the
desired control is on top.
I tried it several times. It doesn't work here (or I am doing something
wrong).
However I use a different approach when I need controls at the same position:
I place the controls at the same horizontal location but on different vertical locations (so that
they are still visible in design view).
Let's say we need four controls cbo1, cbo2, cb3 and cbo4 (comboboxes in this case)
You only need a few lines of code on opening your form :
Me!cbo2.Top=Me!cbo1.Top
Me!cbo3.Top=Me!cbo1.Top
Me!cbo3.Top=Me!cbo1.Top


The .Top method returns "1020". What does this number represent?

BTW, I don't see a reason why Access doesn't permit the user to change
the position of controls (or subforms) with "Send to back" or "Bring to
front". This is even more true considering that those menu items are
highlighted (can be used) when a control/subform is selected. BTW, with
controls, the menu items work proberly (bringing the control to the
front or sending it to the back).

--
Georges

Nov 12 '05 #7

P: n/a
Georges Heinesch wrote:
The .Top method returns "1020". What does this number represent?


Ok, I got it now. You change the top positions of the control. That's a
way indeed!

But still, I wonder why the "Send to back" or "Bring to front"feature
doesn't work with subforms.

--
Georges

Nov 12 '05 #8

P: n/a
Georges,
I thought your original question was about controls, not subforms.
Subforms are 'special' controls, you can't 'send them to back'.

If your question is about subforms then you might consider changing the height at runtime.
Make your subforms small (height) and place your subforms in design view in a way that you can
easily select them.
Then at runtime you can change the .Top and .Height properties as you desire.

Just another thought:
If you use many subforms (visible one at the time) you can also assign the SourceObject for the
subform-control at runtime ...
You only need one subform(control) then.
As an aside this might speed up your form a bit because less recordsets need to be loaded.

--
Hope this helps
Arno R
"Georges Heinesch" <ne**@geohei.lu> schreef in bericht news:3f********@news.vo.lu...
Georges Heinesch wrote:
The .Top method returns "1020". What does this number represent?


Ok, I got it now. You change the top positions of the control. That's a
way indeed!

But still, I wonder why the "Send to back" or "Bring to front"feature
doesn't work with subforms.

--
Georges

Nov 12 '05 #9

P: n/a
Yes, they do, and it's kinda annoying. Larry gave you a good idea to fix it
.... or you could always "reset" their Top and Left property (i.e. move them)
when opening the form, so that in design view you could pretty much put them
whereever you wanted. Then, in the FormOpen event just set those props:

Sub Form_Open()

Me.Ctl2.Left = Me.Ctl1.Left
Me.Ctl2.Top = Me.Ctl1.Top

Me.Ctl3.Left = Me.Ctl1.Left
Me.Ctl3.Top = Me.ctl3.Top

etc etc

Where Ctl1 is the control you have on "top"

--

Scott McDaniel
CS Computer Software
Visual Basic - Access - Sql Server - ASP
"Georges Heinesch" <ne**@geohei.lu> wrote in message
news:3f**********@news.vo.lu...
Scott McDaniel wrote:
They >are< visible, you just can't see them because your top control covers them (obviously). You can select them by using the dropdown (combo) in the Formatting toolbar.


I can select them by using the Formatting (Form/Report) dropdown tool in
this toolbox, but the subform doesn't show up in front of the others.
The bottom ones stay hidden for some reason?!?!

--
Georges

Nov 12 '05 #10

P: n/a
Scott McDaniel wrote:
Sub Form_Open()

Me.Ctl2.Left = Me.Ctl1.Left
Me.Ctl2.Top = Me.Ctl1.Top


In my initial posting, I was talking about controls. In fact I meant
subforms, which are behaving differently than regular controls (as I
know now only).

Your code works fine with controls, but not with subforms.

--
Georges

Nov 12 '05 #11

P: n/a
Arno R wrote:
I thought your original question was about controls, not subforms.
Subforms are 'special' controls, you can't 'send them to back'.
In my initial posting, I was indeed talking about controls. In fact I
meant subforms, which are behaving differently than regular controls. At
that stage, I thought that a subform is just a normal control, which is
not the case as I know now.
If your question is about subforms then you might consider changing the height at runtime.
Make your subforms small (height) and place your subforms in design view in a way that you can
easily select them.
Then at runtime you can change the .Top and .Height properties as you desire.
This was proposed already before. I'm gonna implement that solution most
probably.
Just another thought:
If you use many subforms (visible one at the time) you can also assign the SourceObject for the
subform-control at runtime ...
You only need one subform(control) then.
As an aside this might speed up your form a bit because less recordsets need to be loaded.


Sorry, I lost track here. Could you give details about this solution you
propose.

Thanks.

--
Georges

Nov 12 '05 #12

This discussion thread is closed

Replies have been disabled for this discussion.