>You should really avoid the use of _tally in this way anyway as it is a global var. For example a timer may fire and _tally will hold a different value to the result of your select statement. Much better to test the type and length of your array.
_TALLY is not dependable with arrays, but not for the reason you stated. If a timer fires, it's code will just cue up behind the running code. IOW, without a DOEVENTS, the timer's code cannot jump into the middle of the process.
_TALLY is funky with arrays, because if the select returns no records, _TALLY is not set...
Erik Moore
Clientelligence