Drop/Stop/Halt Code

Kempes

Registered User.
Local time
Today, 10:39
Joined
Oct 7, 2004
Messages
327
not sure which one of the above is correct but I can't seem to find the solution through search (probably me looking in all the wrong places).

ACC 2003

The problem I have is when going from one form to another, there is code placed behind a button triggered by the On Click event (To load to next form).

This works fine, however, in our UAT somebody picked up that if you accidently double click this button, it throws you out of the application with one of those "access has encountered a problem and has to close....etc".

what I was looking at doing was to drop the code running from the On Click event if the button was double clicked, (if that is the correct solution).

I may also try locking this button before the code fires On Click and see if that works.

Thanks in advance

Kempes
 
OK. as a workaround, disabling the button on click appears to work as the user doesn't get the chance to double click it.

Just out of interest, does anyone know if it is possible to drop the running code (I've had issues in the past where you get OUT OF STACK SPACE).

Thanks
 
ctrl + alt + break

for the first problem, when the second form loads, it should take the focus away from the primary form, removing the possibility of the second click. Try issuing a simple Me.visible = false as the first line of the on_click event if you cannot close the form immediately.
 
Last edited:
Thanks.

Is this possible in vb code though rather than manually halting it?

Ie, I have a few things triggering on Mouse move, but when the mouse rolls over another fields/label, I want it to ignore the code it was running through at the time and start the fresh code.
 
not to my knowledge...in fact, I cannot think of a situation where I would actually use that approach. Your functions/subs should all self-terminate when their task is complete.
 
OK, Thanks anyway, Not a big problem anyway,

Cheers
 

Users who are viewing this thread

Back
Top Bottom