A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

How can I programatically bring a form to the top?



 
 
Thread Tools Display Modes
  #1  
Old October 27th, 2008, 09:20 PM posted to microsoft.public.access.forms
Max Moor
external usenet poster
 
Posts: 148
Default How can I programatically bring a form to the top?

Hi All,

If I have a number of forms open on top of each other, how can I use
VBA to make any specific one on top of the rest?

Regards,
Max
  #2  
Old October 27th, 2008, 09:55 PM posted to microsoft.public.access.forms
Mark A. Sam[_3_]
external usenet poster
 
Posts: 468
Default How can I programatically bring a form to the top?

Max,

That isn't the way to do it. Over lay one or more forms on top of each
other and set their visible properties, like this:

SubForm1.Visible = True
SubForm1.Visible=False

Where SubForm1 and SubForm2 re[resent your Subforms.

Try this with a button using the OnClick event.

SubForm1.Visible = Not SubForm1.Visible
SubForm2.Visible=Not SubForm2.Visible

In designview of the main form, set the Visible property of SubForm1 to
Visible = True and SubForm2.Visible = false.

The Button will toggle between the subforms.

God Bless,

Mark A. Sam



"Max Moor" wrote in message
. 16...
Hi All,

If I have a number of forms open on top of each other, how can I use
VBA to make any specific one on top of the rest?

Regards,
Max



  #3  
Old October 28th, 2008, 02:22 PM posted to microsoft.public.access.forms
tina
external usenet poster
 
Posts: 1,997
Default How can I programatically bring a form to the top?

take a look at DoCmd.SelectObject in VBA Help.

hth


"Max Moor" wrote in message
. 16...
Hi All,

If I have a number of forms open on top of each other, how can I use
VBA to make any specific one on top of the rest?

Regards,
Max



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 02:45 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.