T
TedMi
My application opens a series of forms, all non-modal; most have a Form_Load
procedure. Everything works fine, except in this one case: If the series of
forms is open and Access is shut down by closing the top-level window or by
executing a Quit command, one form’s Load procedure runs during the shutdown
process, showing all sorts of error messages, because resources needed by the
load event are being or have been shut down.
This happens most of the time, but not consistently (indicating perhaps a
timing dependency or race condition?), and appears in both 2002 and 2003
versions. Inserting DoEvents did not help. Has anyone seen this before? What
might cause it?
I solved this by moving the offending form’s startup code from the Load to
the Open event, and that cleared it up, but that avoids the symptom instead
of providing a cure. Any thoughts?
procedure. Everything works fine, except in this one case: If the series of
forms is open and Access is shut down by closing the top-level window or by
executing a Quit command, one form’s Load procedure runs during the shutdown
process, showing all sorts of error messages, because resources needed by the
load event are being or have been shut down.
This happens most of the time, but not consistently (indicating perhaps a
timing dependency or race condition?), and appears in both 2002 and 2003
versions. Inserting DoEvents did not help. Has anyone seen this before? What
might cause it?
I solved this by moving the offending form’s startup code from the Load to
the Open event, and that cleared it up, but that avoids the symptom instead
of providing a cure. Any thoughts?