Results 1 to 5 of 5
  1. #1
    robs23 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2014
    Posts
    109

    How to detect a form is FULLY loaded?

    Hi,

    I'm wondering how I can detect that form has finished loading? I read sequence of events from Microsoft help center and according to it, the last event is Form.Current but it triggers before form is fully loaded.. How can I detect that?

    Robert

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    At the command that calls the form to open, but the hourglass ON before you open the form.
    At the end of form load Event, put DOCMD.hourglass OFF.
    When the hourglass is off, the form is done.

  3. #3
    orange's Avatar
    orange is offline Moderator
    Windows XP Access 2003
    Join Date
    Sep 2009
    Location
    Ottawa, Ontario, Canada; West Palm Beach FL
    Posts
    16,716
    Another consideration that my apply is to open the form with only the records you need. Some people have a table as the form's recordsource, when in fact only a few records are required. No sense opening the entire table if only a few records are relevant. Use a query with appropriate criteria as recordsource.

  4. #4
    robs23 is offline Competent Performer
    Windows 7 64bit Access 2010 32bit
    Join Date
    Apr 2014
    Posts
    109
    Actually it turned out that my code IS triggered when the form is fully loaded and the cause lays somewhere else. Let me describe this. The form we're talking about (let's call it "A") is "Please wait while data is loaded" form. It is modal and pop-up form. It is launched every time user opens specified form ("B") and I call code to close it when "B" is loaded. As I said, "A" closes in the right moment. The thing is, it loses focus during the loading process, probably when "B" first appears on the screen (though NOT fully loaded yet e.g. no controls and such). I tried to:
    Code:
    Forms("A").SetFocus
    just after the line where I open "B" but it doesn't work... How can I make form stay on top? I thought modal forms do that by default..

    BTW. Both "A" and "B" are pop-up forms.

    Robert

  5. #5
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    Modal forms are always on top and always get the focus.

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

Similar Threads

  1. Replies: 5
    Last Post: 12-05-2013, 07:54 AM
  2. Replies: 3
    Last Post: 11-16-2012, 10:21 AM
  3. How to check if any form is loaded
    By Kivan in forum Programming
    Replies: 3
    Last Post: 09-03-2012, 08:50 AM
  4. Subform empty when main form loaded
    By martyjward in forum Forms
    Replies: 1
    Last Post: 08-15-2011, 04:37 AM
  5. Replies: 1
    Last Post: 05-18-2011, 12:23 PM

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