Maximized Form restores automatically

T

T.J. Bernard

I have a form that is maximized through code when it is
opened up. This form has its Close Button and Min/Max
Buttons properties set to No, so that the buttons are
grayed out. I preview a report by clicking a button on
this form, which is also maximized.

When I closed the report (it is already maximized) my form
is still open in the back-ground, but it is restored.
Since the Min/Max Buttons are disabled, there is nothing
that can be done to Maximize it again.

Does anyone have any ideas of how to work around this?

Thank you,

T.J. Bernard
 
F

fredg

I have a form that is maximized through code when it is
opened up. This form has its Close Button and Min/Max
Buttons properties set to No, so that the buttons are
grayed out. I preview a report by clicking a button on
this form, which is also maximized.

When I closed the report (it is already maximized) my form
is still open in the back-ground, but it is restored.
Since the Min/Max Buttons are disabled, there is nothing
that can be done to Maximize it again.

Does anyone have any ideas of how to work around this?

Thank you,

T.J. Bernard

Is there any code in the report Close event that uses DoCmd.Restore?
 
V

Van T. Dinh

Use the statement:

DoCmd.Maximize

in the Form_Activate Event. With this, when ever the Form is activated /
active, it will get maximized regarless of the Windows state of the previous
Access data object.
 

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