Form doesn't stay maximized

S

SAC

I use a form as a menu with command buttons on it. These buttons open forms
and reports.

I have set some of the properties of the form as follows:

Views allowed: form
Scroll Bars: Neither
Record Selectors: No
Navigation Buttons: No
Dividing Lines: No

I use a command button to open a form and then when I close that form the
menu form is no longer maximized.

How can I stop this?

Thanks.
 
D

Dirk Goldgar

SAC said:
I use a form as a menu with command buttons on it. These buttons
open forms and reports.

I have set some of the properties of the form as follows:

Views allowed: form
Scroll Bars: Neither
Record Selectors: No
Navigation Buttons: No
Dividing Lines: No

I use a command button to open a form and then when I close that form
the menu form is no longer maximized.

How can I stop this?

Thanks.

Presumably the other form is being restored -- "un-maximized" --
somewhere along the way. In Access, the maximized state applies to all
the child windows -- forms and reports. What you can do is have your
menu form always maximize itself whenever it becomes the active form.
Use the form's Activate event to do this -- create an event procedure
for that event, and add one line to it, like this:

Private Sub Form_Activate()
DoCmd.Maximize
End Sub
 
S

SAC

When I enable a maximize button on the form then it works OK.

Can you please help me understand why?

I would rather not have a mximize button and have it remain maximized.

Thanks.
 
W

Wayne Morgan

Once Access maximizes a window it maximizes all of them. Also, once it
restores a window, it restores all of them. To maximize the menu you could
set it to maximize in its Activate event or you could tell the closing form
to maximize as it closes.
 
S

SAC

Thanks, Dick!

Dirk Goldgar said:
Presumably the other form is being restored -- "un-maximized" --
somewhere along the way. In Access, the maximized state applies to all
the child windows -- forms and reports. What you can do is have your
menu form always maximize itself whenever it becomes the active form.
Use the form's Activate event to do this -- create an event procedure
for that event, and add one line to it, like this:

Private Sub Form_Activate()
DoCmd.Maximize
End Sub

--
Dirk Goldgar, MS Access MVP
www.datagnostics.com

(please reply to the newsgroup)
 
S

SAC

Thanks, Wayne!

Wayne Morgan said:
Once Access maximizes a window it maximizes all of them. Also, once it
restores a window, it restores all of them. To maximize the menu you could
set it to maximize in its Activate event or you could tell the closing form
to maximize as it closes.
 

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

Top