Visible, maximize, hide, minimize, restore, enable?!

andrewf10

Registered User.
Local time
Today, 18:09
Joined
Mar 2, 2003
Messages
114
Hi all,

I hope some of you can give me some inspiration here.

I have an Autoexec macro that opens Form1 and Form 2 at the same time.
Both forms maximise and Form2 is the one that shows on screen, with Form1 behind it. Both forms are modal.
What I need is a command button on Form2 that will bring Form1 to the front when I click it. Obviously I want a similar button on Form1 which will bring Form2 to the front when I click it.

I've played around with what seems like every possible combination of visible, maximize, hide, minimize, restore, enable etc and there's some flaw with all of them.

Does anyone know a neat way of doing this as it's really driving me mad here?

Thanks in advance
Andrew
 
Toggle the visible properties of the forms or change the Modal property
Me.Form.Modal=False
 
Last edited:
Andrew,

Or try .SetFocus

Wayne
 
Huge thanks guys for your really quick replies.

The .setfocus method works like a dream so I'll definitely use this instead of the other methods I tried out.

Interestingly, it wouldn't work without temporarily setting the form to non-Modal as you suggested Rich so thanks again to you both.
 
Last edited:

Users who are viewing this thread

Back
Top Bottom