Results 1 to 11 of 11
  1. #1
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Return to form fills screen (2002)

    I have just finiished an application with several forms, and each form has a command button that previews a report. All of the forms work the same except for one. Upon closing the preview the one problem form returns, but the borders have been extended to fill the screen. On all other previews the form returns in the normal way, i.e. centered on the screen. I can't see any difference in the way the forms are setup or the commands to preview the report. Any suggestions?

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Return to form fills screen (2002)

    Does the report called from this form have DoCmd.Maximize in its On Open or On Activate event, or a macro with the Maximize command?

  3. #3
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Return to form fills screen (2002)

    Yes, but so do all of the reports have a DoCmd.Maximize in their open event, and they don't cause a return to full screen.

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Return to form fills screen (2002)

    I assume that the other reports also have DoCm.Restore in their On Close event; does the report called from the problem form have that too?

  5. #5
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Return to form fills screen (2002)

    Actually, none of the reports have a DoCmd.Restore event. What's even curiouser (?) is that I have two calls to the same report. The calls are identical except the one with the problem has a WhereCondition that limits the report to only one record in the file. The other report lists all records in the file. They are called from different forms.

  6. #6
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Return to form fills screen (2002)

    Try putting DoCmd.Restore in the On Deactivate and/or in the On Close event of the report.

  7. #7
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Return to form fills screen (2002)

    I tried DoCmd.Restore in both the deactivate and close events -- no change.

    What remains a mystery to me is the fact that the same report returns from one form normally and from another form in the a maximized manner. I just don't understand the difference.

  8. #8
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Return to form fills screen (2002)

    I don't think we can solve this without seeing the database. If possible, post a stripped down copy of the database. See <post#=396578>post 396578</post#> for instructions.

  9. #9
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Return to form fills screen (2002)

    OK. Attached is the problem db.

    Clicking on Preview in the Main Menu brings up a report. Returning from this report is normal.

    Click on Active on the Main Menu brings up another form. Clicking on Preview in that form brings up the same report (albeit with differen WhenCondition clause). Closing this report results in an expanded form that fills the screen instead of the initial smaller form.

  10. #10
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Return to form fills screen (2002)

    The explanation is that the MinMaxButtons property of frmMainMenu is set to None, so this form cannot be maximized, while the MinMaxButtons property of frmShutinWithVisits is set to Both, so this form CAN be maximized. You can set the MinMaxButtons property for frmShutinWithVisits to None. Or, as I suggested earlier, you can create an On Close event procedure for the report that executes DoCmd.Restore - it works for me in this database.

  11. #11
    Bronze Lounger
    Join Date
    Feb 2001
    Location
    Escondido, California, USA
    Posts
    1,458
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Return to form fills screen (2002)

    Thanks again Hans,

    Turning Min/Max off did the trick.

Posting Permissions

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