Results 1 to 5 of 5
  1. #1
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Maximising and restoring (A2000)

    I amusing the following code to maximise a report in Preview view:

    Private Sub Report_Open(Cancel As Integer)
    DoCmd.Maximize
    End Sub

    I want the preview to restore itself when I close it so that it doesn't muck around with the size of the underlying calling form. I've tried the following code but it doesn't seem to work.

    Private Sub Report_Close()
    DoCmd.Restore
    End Sub

    On a similar vein, what is the point of the thin form border which MS Help states cannot be maximised, but clearly can if a called report or form is maximised?

    Is there a way where all report previews can be automatically maximised while all forms can be automatically the size programmed?

  2. #2
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Maximising and restoring (A2000)

    Sorry, didn't engage brain quick enough. Was looking at wrong report code.

    Restore does work but the underlying form doesn't reappear centred. Is there a reason for this?

  3. #3
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Maximising and restoring (A2000)

    Was it centered before you maximized?
    Charlotte

  4. #4
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Maximising and restoring (A2000)

    Ouch!

    Normally I set every form to centred when I first create it, but for some reason I failed to do this in the database I was looking at. Hey presto, it now centres as expected.

    A senior moment I think. Sorry for troubling you.

  5. #5
    Plutonium Lounger
    Join Date
    Dec 2000
    Location
    Sacramento, California, USA
    Posts
    16,775
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Maximising and restoring (A2000)

    Don't worry about it, it happens to all of us. <img src=/S/smile.gif border=0 alt=smile width=15 height=15>
    Charlotte

Posting Permissions

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