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
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
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.
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.
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:
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..Code:Forms("A").SetFocus
BTW. Both "A" and "B" are pop-up forms.
Robert
Modal forms are always on top and always get the focus.