Form becoming un-Anchored

gblack

Registered User.
Local time
Today, 21:32
Joined
Sep 18, 2002
Messages
632
I have a form that I open maximized.

Then I have a button which opens another form. Whenever this form is being opened, it subsequently un-maximizes all the maximized forms that were opened before it (which involves a switchboard and one other form).

As of this moment I haven't been able to prevent this. Am I missing a properties setting? Or is this some crazy Access bug that I'm gonna have to code for?


Thanks (in advance) for any responses.
G
 
In the form On Activate Event simply type in DoCmd.Restore
 
Hmm

Didn't seem to work.
 
Me too. DoCmd.Maximize did work but...

I'm surprised that the DoCmd.Maximize didn't work when placed in your "on activate" code. In any case, it would seem to me that this may not be a great solution anyway, as it is a rather slow and ungraceful process of re- maximizing the previous forms. It blinks quite a bit, takes a full half second or so, and gives a rather unprofessional appearance. Does anyone know if this can be improved or performed in a more rapid and graceful way? Why would microsoft unmaximize the underlying forms anyway?

Thanks.
 
Incidentally, Gblack..

I don't know your user level, but I wanted to clarify that the DoCmd.Maxize is not actually in the field itself for "on activate", but rather written into the module (VB code) that underlies it. You may already know this, but just wanted to make sure.
 
Yes,

I know. I really don't understand this mechanism though. Why would you make opening one form effect another by default? It doesn't make any sense.

And yes... all the flashy things that go on is quite distracting when trying to deal with docmd.whatever

Honestly even the switchboard un-maximizes which I can't see ANY reason someone would want this to happen.

I think I should have posted this question on the VBA code section. I don't think the form section gets as much traffic.

I was hoping that it was simply a property setting that I could change to make this NOT happen... but so far I have had no luck and the docmd.restore seems to do nothing.

Public Post MyIssue()
Dim aMyStatus as Attitude

aMyStatus = vbAnnoyed
me.Emotion = aMystatus

End Post
 
Answer

Here's the simple answer I was looking for:

The form losing focus is maximized and you are changing focus to another maximized object. All multiple-document interface (MDI) objects that do not have focus are automatically restored to a windowed state behind the maximized MDI form that has focus. When the current form loses focus, Windows automatically restores it to a windowed state, causing the Resize event to occur.

When you maximize a form, all other forms that are open are also maximized. You cannot maximize one form independent of the other open forms.

work around:
Set the form's PopUp property to Yes. Forms whose PopUp property is set to Yes are not MDI child windows. Pop-up forms float on top of other forms, and are not maximized when an MDI child window is maximized.
 

Users who are viewing this thread

Back
Top Bottom