Results 1 to 9 of 9
  1. #1
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    263

    Delay opening a form maximized

    The first form of my application is opened maximized using the docmd.maximize command in the form load event.
    However, there is a short (about 1/4 second) delay before this happens and the form can clearly be seen in normal mode before maximization. This looks a bit naff.

    I recently migrated from Access 2007 to Access 365 and must have addressed this problem about 10 years ago. I have an autoexec which is below, and the comment shows this was done to address this problem.
    Click image for larger version. 

Name:	Capture.JPG 
Views:	12 
Size:	20.0 KB 
ID:	47529

    This no longer seems to work in Access 365.
    Anyone else experience this. Not a big issue of course, but would like to fix it if it is easy.



    The forms are set to be Overlapping, but the fault also exists in Tabbed, but is not quite so obvious.

    Incidentally, I have a line in the load event Me.Visible = True that sets the form visible (at the end of the load event well after the maximise line), but if I remove this, the form still starts as visible - the hidden line in the autoexec seems to have no effect.
    I load another form using the code :
    DoCmd.OpenForm "Individual", , , , , acHidden
    which does work on this particular form and it is invisible until I set it visible.
    Last edited by Miles R; 03-24-2022 at 06:11 AM. Reason: Additional info

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,841
    Not experienced the problem myself but if its working with vba, create a vba function to open the form as hidden and call that from your macro instead

  3. #3
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    263
    Thanks for the idea. I tried that but it makes no difference. Also, the Main form still appears visible even though it I commented out the line Me.Visible = True in the load event.

  4. #4
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,367
    Load event happens after Open so I'd move that code to the Open event to see if that fixes it. My rationale is that when open event is finished, form is open and rendered, then you're doing sizing/visibility stuff to it in the load event. Might only be a split second between those events, but perhaps is enough to cause this issue. This might come in handy down the road

    https://support.microsoft.com/en-us/...86553682f9#bm3
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  5. #5
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    263
    Thanks Micron, but I've tried that already - it makes no difference.

    I'm surprised no-one else has noticed the slight delay in maximizing the form if it is loaded maximized when the application is started. Can't believe its only me.

    I have also noticed that using the command DoCmd.Maximize always make the form visible even if it was set with Me.Visible = False before doing the maximize (this applies to Popups as well as non-popups).
    Using Me.Visible = False after the maximize command does make it invisible though.

    I guess I'll probably have to live with this one.

  6. #6
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,367
    Is this form set as the form to open in db options by any chance?
    I wonder if the fact that there's a macro involved has anything to do with this. As Ajax suggested, I'd be using only coded form events. I might use AutoExcec to call it or use open event of a form set set to open in db options.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  7. #7
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    263
    No, the form to open in db options is set to none.
    Its a long time ago that I first wrote this application, but I must have used the autoexec to open the form as hidden to get round the problem I have outlined.
    It must have worked in Access 2007, but does not work in Access 365, so there is no point in using autoexec at all and I will set the main form to open in the db options and live with the 1/4 second delay to maximize.

  8. #8
    Micron is offline Very Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,367
    Or do the form manipulation in the form opening code and ditch the macro? If that won't help I think I'm out of ideas.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  9. #9
    Miles R is offline Competent Performer
    Windows 10 Office 365
    Join Date
    Mar 2019
    Posts
    263
    Thanks for your reply. Yes, I have now ditched the macro and do all form manipulation in the form open and form load events.
    I have improved the situation by putting Application.Echo False at the start of the Open Event and Application.Echo True at the end of the Load event.
    All I see now is the Main form loaded with the title bar at the top, then a fraction of a second later the form jumps upwards into the Maximized state with title bar gone.
    That'll have to do. No big deal.

    As I say, I'm surprised no-one else has noticed this. I don't think I am doing anything particularly unusual - opening the database with the first form maximized.

    I'll mark this thread as solved though.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Delay form closing
    By NextGen in forum Forms
    Replies: 3
    Last Post: 04-18-2019, 07:08 PM
  2. Opening Forms Maximized
    By data808 in forum Forms
    Replies: 3
    Last Post: 04-29-2014, 04:37 PM
  3. open form Maximized
    By Chazcoral in forum Forms
    Replies: 8
    Last Post: 09-18-2012, 02:18 PM
  4. Form always opens as Maximized...
    By Heatshiver in forum Forms
    Replies: 1
    Last Post: 01-05-2012, 03:24 AM
  5. How to open form in a window, not maximized ?
    By peshonzi in forum Access
    Replies: 4
    Last Post: 07-07-2011, 06:52 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums