Results 1 to 4 of 4

Thread: Maximize Form

  1. #1
    Join Date
    Feb 2010
    Location
    Yorkshire UK
    Posts
    76

    Unanswered: Maximize Form

    Hi,
    I have this problem and can not see that it has come up before on here.

    I have a form. When I click a command button, a report opens. When I close the report, the form reappears but it is NOT maximized. Is there a way that I can make sure the form remains at maximized size even when the report closes?

    I use docmd.maximze when the form and the report opens. When the report closes, I use docmd.restore in the close event.

    I can get around it by placing an openform part in the report close event but I need to use the same report in various forms and do not want to do this.

    Can anyone help?

    Thanks
    Simon

  2. #2
    Join Date
    Mar 2009
    Location
    Dorset
    Posts
    119
    have you looked at the code that is opening the report?
    Is it affecting the form in any way?
    Regards
    JD

    Software-Matters

  3. #3
    Join Date
    Feb 2010
    Location
    Yorkshire UK
    Posts
    76
    I have sorted it now. I have an AUTOEXEC MACRO set to maximize.

    I have removed the docmd.maximize from the report open event.

    Now when I close the report, the form underneath stays at max size.

  4. #4
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Glad you got this worked out.

    Just for future reference, when you need to do something when returning to a form from another form or report, such as re-maximizing it, place the code in the Form_Activate event.

    If by this

    "When the report closes, I use docmd.restore in the close event. "

    you mean you're doing this to the form, that's why it wasn't staying maximized. Restore returns an object to the original desiged size.
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •