Report will not maximize

TJBernard

Registered User.
Local time
Today, 22:19
Joined
Mar 28, 2002
Messages
176
I have a report which will not maximize despite the code. When I trace through the code it correctly runs over the "Docmd.maximize" statement and then it works correctly. But when I open up the database and do not step through the code, but click exactly the same command button it will not maximize.

I have three forms, all of which are pop-up forms. They are left open as the next form is opened up (each next form is larger than the previous so the previous forms cannot be seen). So when I open up the report I set the visible property of the 3 forms to false then maxmize the report. As such:

Form1.Visible = False
Form2.Visible = False
Form3.Visible = False
Docmd.Maximize

One strange thing I notice is if I open up the database window and maximize the database window, then open up the forms and click the button to run the exactly same code then the report maximizes.

If anyone has run into this or has any ideas let me know.

Thank you,

TJBernard
 
Try putting the DoCmd.Maximize statement in the Report_Activate() section of the report instead. (you can place "DoCmd.Restore" in the Report_Deactivate() section if you need to).

Hope that helps!

-Sean
 
That worked. Not sure why it wouldn't work on the open command, but placing it in the activate command allowed the report to maximize correctly.

Thank you,

TJBernard
 

Users who are viewing this thread

Back
Top Bottom