Tom,
Here is a WAG: check the call stack when the error occurs. Perhaps
there is some unexpected recursion going on? "repopulate s and
recomputes" could easily re-invoke the Current event.
Everything was clean and as expected.
Otherwise, use the proven debug technique of reducing the problem to
its essential components. You may then want to post that code here.
I had pretty much done that to get it down to being the Form_Current event.
The quick-and-dirty fix (hold your nose!) that I just put in was to put
the call to the routine to repopulate and recompute things into the
timer along with a line to clear the TimerInterval, and set the
TimerInterval to 1 in the Form_Current routine to trigger the timer
immediately (in 1ms) following the Form_Current event. Of course I would
prefer to rip that mess out and "do it right" however that might be, but
at least I got the code running for now while I look for a better way.
Timers have long been used to cover problems with events, e.g. the lack
of an "Opened" event. The problem in Access (vs. VB) is that you only
get one timer per form, so you had better pray that you don't have more
than one such problem per form.
Thanks for taking a shot at my mess.
Steve Richfie1d
=============== ========
In Access 97, in the Form_Current routine of a form, I call another
routine that repopulates and recomputes everything. However, a SQL
Select statement that I initiate from DAO that refers to a function of
mine errors out, claiming that the function does not exist. However, if
I move the call to that same routine to various places other than the
Form_Curren t routine, it works just fine! It appears that Jet/Access is
somehow unable to find functions in SQL statements if Form_Current is
anywhere in the call list!!!
Do you have ANY idea as to what might be happening here?
Thanks in advance for even your wildest ass of guesses.
Steve Richfie1d