How can I programatically bring a form to the top?

  • Thread starter Thread starter Max Moor
  • Start date Start date
M

Max Moor

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
 
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
 

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

Back
Top