ALL variables include local, and even non public variables are re-set when
you encounter a error.
So, it is NOT just a global problem, but even the local vars in the current
routine will get re-set.
There are several solutions:
1) Place error handing code in any routine
2) use a mde.
You should be deploying a mde file to your users anyway. The added bonus of
a mde is that un-handled errors don't re-set the variables. This is only
one of many reasons why a mde file is going to be much more reliable then a
mdb file. Of course, to use a mde file, then you really have to split your
database. You can read about that here:
http://www.members.shaw.ca/AlbertKal...plit/index.htm
So, since mde's don't re-vars, I always distribute them to my users....
--
Albert D. Kallal (Access MVP)
Edmonton, Alberta Canada
pl*****************@msn.com http://www.members.shaw.ca/AlbertKallal