Bring Subform to Top

  • Thread starter Thread starter Dave
  • Start date Start date
D

Dave

I have multiple subforms that I'm resizing on the fly. The problem is
that when one is resized, it overlaps another one. I need to bring
the selected subform to the top of the stack, but I haven't been able
to find anything on how to do that. I could be just asking the
question wrong, but after about 15 attempts...it's time to post it on
Google.

How do you bring a control to the top on the fly with code?
 
Hi Dave,

You would be making design changes to your Form (i.e., open Form in design
view, for control Bring to Front OR Send to Back). This would not look
good to the user.

Thereby you may want to do something like the following:
- Create Labels that represent the subForms
[Label SubForm1] [Label SubForm2]
[etc...]

- For the OnClick event of the SubForms make the appropriate SubForm
visible and the other SubForm controls not Visible, example when clicking
on [Label SubForm1]
[SubForm1].Visible = True
[SubForm2].Visible = False
[SubForm3].Visible = False
etc....

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."


--------------------
| From: (e-mail address removed) (Dave)
| Newsgroups: microsoft.public.access.forms
| Subject: Bring Subform to Top
| Date: 30 Jan 2004 07:33:50 -0800
| Organization: http://groups.google.com
| Lines: 8
| Message-ID: <[email protected]>
| NNTP-Posting-Host: 63.203.180.122
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1075476830 9363 127.0.0.1 (30 Jan 2004
15:33:50 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Fri, 30 Jan 2004 15:33:50 +0000 (UTC)
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.
phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu
-berlin.de!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.forms:253005
| X-Tomcat-NG: microsoft.public.access.forms
|
| I have multiple subforms that I'm resizing on the fly. The problem is
| that when one is resized, it overlaps another one. I need to bring
| the selected subform to the top of the stack, but I haven't been able
| to find anything on how to do that. I could be just asking the
| question wrong, but after about 15 attempts...it's time to post it on
| Google.
|
| How do you bring a control to the top on the fly with code?
|
 
Eric,
Thanks for the reply. My intent is to try and keep All the subforms
visible. They're sized so that all can fit horizontally, but because
the information extends the size of the Subform, when the user selects
the subform it needs to resize on the fly so that it can display all
the contents. Therefore, it will need to the front of the other 3.
I've got the code to resize in the OnEnter event of each of the
subforms, and it works great. Now comes the task of bring them to the
front when selected.

I hope that you, or someone else perhaps, can help me with this.

Thanks


Hi Dave,

You would be making design changes to your Form (i.e., open Form in design
view, for control Bring to Front OR Send to Back). This would not look
good to the user.

Thereby you may want to do something like the following:
- Create Labels that represent the subForms
[Label SubForm1] [Label SubForm2]
[etc...]

- For the OnClick event of the SubForms make the appropriate SubForm
visible and the other SubForm controls not Visible, example when clicking
on [Label SubForm1]
[SubForm1].Visible = True
[SubForm2].Visible = False
[SubForm3].Visible = False
etc....

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."


--------------------
| From: (e-mail address removed) (Dave)
| Newsgroups: microsoft.public.access.forms
| Subject: Bring Subform to Top
| Date: 30 Jan 2004 07:33:50 -0800
| Organization: http://groups.google.com
| Lines: 8
| Message-ID: <[email protected]>
| NNTP-Posting-Host: 63.203.180.122
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1075476830 9363 127.0.0.1 (30 Jan 2004
15:33:50 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Fri, 30 Jan 2004 15:33:50 +0000 (UTC)
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.
phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu
-berlin.de!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.forms:253005
| X-Tomcat-NG: microsoft.public.access.forms
|
| I have multiple subforms that I'm resizing on the fly. The problem is
| that when one is resized, it overlaps another one. I need to bring
| the selected subform to the top of the stack, but I haven't been able
| to find anything on how to do that. I could be just asking the
| question wrong, but after about 15 attempts...it's time to post it on
| Google.
|
| How do you bring a control to the top on the fly with code?
|
 
Hi Dave,

The only way I see it can be done if you use

Macro:
RunCommand
BringToFront

Problem is that the Form will need to be in design view and a control
(subForm) would need to be selected prior to running command.

Eric



--------------------
| From: (e-mail address removed) (Dave)
| Newsgroups: microsoft.public.access.forms
| Subject: Re: Bring Subform to Top
| Date: 2 Feb 2004 06:00:27 -0800
| Organization: http://groups.google.com
| Lines: 85
| Message-ID: <[email protected]>
| References: <[email protected]>
<[email protected]>
| NNTP-Posting-Host: 63.203.180.122
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1075730427 24096 127.0.0.1 (2 Feb 2004
14:00:27 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Mon, 2 Feb 2004 14:00:27 +0000 (UTC)
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
phx.gbl!newsfeed00.sul.t-online.de!t-online.de!newsfeed.gamma.ru!Gamma.RU!n
ews.maxwell.syr.edu!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.forms:253292
| X-Tomcat-NG: microsoft.public.access.forms
|
| Eric,
| Thanks for the reply. My intent is to try and keep All the subforms
| visible. They're sized so that all can fit horizontally, but because
| the information extends the size of the Subform, when the user selects
| the subform it needs to resize on the fly so that it can display all
| the contents. Therefore, it will need to the front of the other 3.
| I've got the code to resize in the OnEnter event of each of the
| subforms, and it works great. Now comes the task of bring them to the
| front when selected.
|
| I hope that you, or someone else perhaps, can help me with this.
|
| Thanks
|
|
| (e-mail address removed) ("prabha") wrote in message
| > Hi Dave,
| >
| > You would be making design changes to your Form (i.e., open Form in
design
| > view, for control Bring to Front OR Send to Back). This would not look
| > good to the user.
| >
| > Thereby you may want to do something like the following:
| > - Create Labels that represent the subForms
| > [Label SubForm1] [Label
SubForm2]
| > [etc...]
| >
| > - For the OnClick event of the SubForms make the appropriate
SubForm
| > visible and the other SubForm controls not Visible, example when
clicking
| > on [Label SubForm1]
| > [SubForm1].Visible = True
| > [SubForm2].Visible = False
| > [SubForm3].Visible = False
| > etc....
| >
| > I hope this helps! If you have additional questions on this topic,
please
| > respond back to this posting.
| >
| >
| > Regards,
| >
| > Eric Butts
| > Microsoft Access Support
| >
| > "Microsoft Security Announcement: Have you installed the patch for
| > Microsoft Security Bulletin MS03-026? If not Microsoft strongly
advises
| > you to review the information at the following link regarding Microsoft
| > Security Bulletin MS03-026
| > <http://www.microsoft.com/security/security_bulletins/ms03-026.asp>
and/or
| > to visit Windows Update at <http://windowsupdate.microsoft.com/> to
install
| > the patch. Running the SCAN program from the Windows Update site will
help
| > to insure you are current with all security patches, not just MS03-026."
| >
| >
| > --------------------
| > | From: (e-mail address removed) (Dave)
| > | Newsgroups: microsoft.public.access.forms
| > | Subject: Bring Subform to Top
| > | Date: 30 Jan 2004 07:33:50 -0800
| > | Organization: http://groups.google.com
| > | Lines: 8
| > | Message-ID: <[email protected]>
| > | NNTP-Posting-Host: 63.203.180.122
| > | Content-Type: text/plain; charset=ISO-8859-1
| > | Content-Transfer-Encoding: 8bit
| > | X-Trace: posting.google.com 1075476830 9363 127.0.0.1 (30 Jan 2004
| > 15:33:50 GMT)
| > | X-Complaints-To: (e-mail address removed)
| > | NNTP-Posting-Date: Fri, 30 Jan 2004 15:33:50 +0000 (UTC)
| > | Path:
| >
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.
| >
phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu
| > -berlin.de!postnews1.google.com!not-for-mail
| > | Xref: cpmsftngxa07.phx.gbl microsoft.public.access.forms:253005
| > | X-Tomcat-NG: microsoft.public.access.forms
| > |
| > | I have multiple subforms that I'm resizing on the fly. The problem is
| > | that when one is resized, it overlaps another one. I need to bring
| > | the selected subform to the top of the stack, but I haven't been able
| > | to find anything on how to do that. I could be just asking the
| > | question wrong, but after about 15 attempts...it's time to post it on
| > | Google.
| > |
| > | How do you bring a control to the top on the fly with code?
| > |
|
 
Eric,
Thanks for your Input. Before I got your response that morning I was
on my way to work, going over the things that did work, and the things
that didn't. I came up with "Continue to use the things that do
work". So, since sizing the sub-forms to the length I needed worked,
why couldn't I go one step further and shrink the sub-form that was in
the way. It was a little more programming, and some math to figure
out the exact dimensions that I needed, but it works Great.

Thanks Again



Hi Dave,

The only way I see it can be done if you use

Macro:
RunCommand
BringToFront

Problem is that the Form will need to be in design view and a control
(subForm) would need to be selected prior to running command.

Eric



--------------------
| From: (e-mail address removed) (Dave)
| Newsgroups: microsoft.public.access.forms
| Subject: Re: Bring Subform to Top
| Date: 2 Feb 2004 06:00:27 -0800
| Organization: http://groups.google.com
| Lines: 85
| Message-ID: <[email protected]>
| References: <[email protected]>
<[email protected]>
| NNTP-Posting-Host: 63.203.180.122
| Content-Type: text/plain; charset=ISO-8859-1
| Content-Transfer-Encoding: 8bit
| X-Trace: posting.google.com 1075730427 24096 127.0.0.1 (2 Feb 2004
14:00:27 GMT)
| X-Complaints-To: (e-mail address removed)
| NNTP-Posting-Date: Mon, 2 Feb 2004 14:00:27 +0000 (UTC)
| Path:
cpmsftngxa07.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFTNGXA05.phx.gbl!TK2MSFTNGP08
.phx.gbl!newsfeed00.sul.t-online.de!t-online.de!newsfeed.gamma.ru!Gamma.RU!n
ews.maxwell.syr.edu!postnews1.google.com!not-for-mail
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.forms:253292
| X-Tomcat-NG: microsoft.public.access.forms
|
| Eric,
| Thanks for the reply. My intent is to try and keep All the subforms
| visible. They're sized so that all can fit horizontally, but because
| the information extends the size of the Subform, when the user selects
| the subform it needs to resize on the fly so that it can display all
| the contents. Therefore, it will need to the front of the other 3.
| I've got the code to resize in the OnEnter event of each of the
| subforms, and it works great. Now comes the task of bring them to the
| front when selected.
|
| I hope that you, or someone else perhaps, can help me with this.
|
| Thanks
|
|
| (e-mail address removed) ("prabha") wrote in message
| > Hi Dave,
| >
| > You would be making design changes to your Form (i.e., open Form in
design
| > view, for control Bring to Front OR Send to Back). This would not look
| > good to the user.
| >
| > Thereby you may want to do something like the following:
| > - Create Labels that represent the subForms
| > [Label SubForm1] [Label
SubForm2]
| > [etc...]
| >
| > - For the OnClick event of the SubForms make the appropriate
SubForm
| > visible and the other SubForm controls not Visible, example when
clicking
| > on [Label SubForm1]
| > [SubForm1].Visible = True
| > [SubForm2].Visible = False
| > [SubForm3].Visible = False
| > etc....
| >
| > I hope this helps! If you have additional questions on this topic,
please
| > respond back to this posting.
| >
| >
| > Regards,
| >
| > Eric Butts
| > Microsoft Access Support
| >
| > "Microsoft Security Announcement: Have you installed the patch for
| > Microsoft Security Bulletin MS03-026? If not Microsoft strongly
advises
| > you to review the information at the following link regarding Microsoft
| > Security Bulletin MS03-026
| > <http://www.microsoft.com/security/security_bulletins/ms03-026.asp>
and/or
| > to visit Windows Update at <http://windowsupdate.microsoft.com/> to
install
| > the patch. Running the SCAN program from the Windows Update site will
help
| > to insure you are current with all security patches, not just MS03-026."
| >
| >
| > --------------------
| > | From: (e-mail address removed) (Dave)
| > | Newsgroups: microsoft.public.access.forms
| > | Subject: Bring Subform to Top
| > | Date: 30 Jan 2004 07:33:50 -0800
| > | Organization: http://groups.google.com
| > | Lines: 8
| > | Message-ID: <[email protected]>
| > | NNTP-Posting-Host: 63.203.180.122
| > | Content-Type: text/plain; charset=ISO-8859-1
| > | Content-Transfer-Encoding: 8bit
| > | X-Trace: posting.google.com 1075476830 9363 127.0.0.1 (30 Jan 2004
15:33:50 GMT)
| > | X-Complaints-To: (e-mail address removed)
| > | NNTP-Posting-Date: Fri, 30 Jan 2004 15:33:50 +0000 (UTC)
| > | Path:
| >
cpmsftngxa07.phx.gbl!cpmsftngxa06.phx.gbl!cpmsftngxa09.phx.gbl!TK2MSFTNGP08.
| >
phx.gbl!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!fu
| > -berlin.de!postnews1.google.com!not-for-mail
| > | Xref: cpmsftngxa07.phx.gbl microsoft.public.access.forms:253005
| > | X-Tomcat-NG: microsoft.public.access.forms
| > |
| > | I have multiple subforms that I'm resizing on the fly. The problem is
| > | that when one is resized, it overlaps another one. I need to bring
| > | the selected subform to the top of the stack, but I haven't been able
| > | to find anything on how to do that. I could be just asking the
| > | question wrong, but after about 15 attempts...it's time to post it on
| > | Google.
| > |
| > | How do you bring a control to the top on the fly with code?
| > |
|
 
Dave

I've been struggling with exactly the same issue and also couldn't find another solutions than to resize (shrink) the underlying forms
Would it be possible to send me the code you used to resize the active form and resize the underlying form
Thanks,
 
Back
Top