No "Got Focus"

  • Thread starter Thread starter Frank B
  • Start date Start date
F

Frank B

I have a Form "A" that displays some status information,
and it has a couple of Command Buttons that leads to other
secondary forms "B", "C", "D", etc. where some work is
done. When the work is done, and the secondary forms are
closed, all that is on the screen is Form "A" and the "Got
Focus" event does not tiggered. Even if I click in Form
A, still no GF event. The reason I need the GF event is to
update the status info. The only unusual aspect of this
form is that it has an Empty Control Source. Thanks for
some ideas.... Frank
 
It does not raise the Activate Event, I suppose because it
is already active. Thanks, but not the answer.... Frank
 
Frank B said:
I have a Form "A" that displays some status information,
and it has a couple of Command Buttons that leads to other
secondary forms "B", "C", "D", etc. where some work is
done. When the work is done, and the secondary forms are
closed, all that is on the screen is Form "A" and the "Got
Focus" event does not tiggered. Even if I click in Form
A, still no GF event. The reason I need the GF event is to
update the status info. The only unusual aspect of this
form is that it has an Empty Control Source. Thanks for
some ideas.... Frank


If the secondary form is called as a dialog, you won't get back from the
OpenForm call until the secondary form has been closed. You can update the
status info then.

If the secondary form is *not* called as a dialog, perhaps you could wait
for it to close, like this:

dim s as string
docmd.openform "frmSecondary", ....
on error resume next
do until err.number <> 0
doevents ' <- important!
s = forms("frmSecondary").name
loop
on error goto 0

HTH,
TC
 
Hi,
Well it certainly works for me. If I have 3 forms open and 2 are closed,
the remaining form's activate event IS fired.
 
Back
Top