when divide by zero occurs, select End (button) on the error message.
The
End statement as well as the
End button in the error message box both terminate the (VBA) application. In the runtime environment this actually ends the application while in "normal" Access the Access application stays active but is reset.
The question is: Is it
generally better that TempVars keep their value? Definitely no!
It depends on the variable and the situation. If the error happened while the code was supposed to set the variable to a new value, it is equally bad if a (normal) variable is reset or if a temp var keeps the old value that should have been updated.
After an unhandled runtime error occurred, the state of the application cannot be trusted anymore.
The caveat must be: "Handle possible errors!", not "Use tempvars so that your application may (or may not) be able to continue executing in an undefined state after an unhandled error occurred."