The distinction is that I wasn't using "nuclear" in reference to people but rather to a program. You have used that name to describe people in what you refer to as "having fun." Having fun at the expense of another member is the action that gets you in trouble. My use of the word "nuclear" does not constitute a threat. Besides, I left my nuclear weapons in my other pants and they are at the dry cleaners.
I have run into a situation before where variables were being emptied and it was causing errors that I was unaware about,
I'm guessing, of course, but that little four-option box or some other kind of inadequate error handling was involved. I will add a small amount of advice if I may. When you want to trap an error that you suspect might happen, trap it in the same routine where you expect it. The reason is that an untrapped error diddles with your program stack.
In that article I referenced, it says "Access searches for a handler" but that was a summary level statement, necessary because that was supposed to be a short article. Here is what REALLY is going on.
When you write VBA code, Access is your MAIN program. Your event routines are
subroutines called (indirectly) by Access when the given event occurs. Event routines can also call any subroutines or functions you have written. Each time you or Access calls a subroutine, the current machine context is saved on the user's program stack to create a new execution context. When you return from a subroutine, this saved context is what is used to return to the subroutine's caller. With me so far?
If you are in a subroutine and declare an exit handler, there is a place in your current context (called a Frame in some circles) that remembers the address you named as the handler within this routine. (The On Error GoTo X statement does that.) Suppose you then call another subroutine. In that new subroutine, you can establish another handler. Let's say you DID that. When you exit this 2nd level subroutine, which handler is active? The one in the context to which you returned, because the context that holds the most recent handler was discarded when you did the RETURN or END SUB instruction. So the previous stack context is restored - and that includes the handler. The 2nd level context is discarded.
Where am I going with this? Let's say you have an event routine that calls a subroutine that calls another subroutine. So that is three layers deep. You can set this up and verify it from the VBA screen by using View>> Call Stack. Now suppose you take a fatal error in that 3rd-level routine. So
Windows handles the error by looking in the current call context to find your handler. If you don't have one in this level, Windows does what is called a Stack Unwind as it discards your current context and then restores the caller's context. This error process repeats again because the error is now raised again (re-signaled) once the Unwind is complete. Suppose you don't have something set up in the level 2 routine. So another layer of the stack gets unwound and another caller's context is restored, this time the 1st level (event) routine. Let's say IT fails to find a handler.
This process can only do two more stack unwinds. The first one returns to Access itself, because it was the caller of your event routine. As noted, Access
has a "last chance Access handler" so that stops the process, the error is signaled, and Access retains control. In fact, that screen shot you showed us is probably an example of exactly this situation.
But let's do a
hypothetical follow-up. SUPPOSE for the sake of argument that Access didn't have a last-chance handler? Well, what happens then is easy. You see, every process under Windows is actually a subroutine of the windows Process Scheduler. So if ACCESS failed to manage the error, Windows ALSO has a last-chance handler residing in association with the system Process Scheduler, the thing that launches tasks.
The reason Windows handles this is mostly because Access merely calls the Windows debug support routines that are common to any Windows executable image. But because a Stack Unwind is a distinct possibility, Windows usually takes over momentarily.