how to stop an infinite loop?

  • Thread starter Thread starter Gijs van Swaaij
  • Start date Start date
G

Gijs van Swaaij

Just a quick question: how can I kill an infinite loop without losing
my unsaved data? I'm asking because I just lost half an hour of work
after ending access with Task Manager, after it had entered an infinite
loop. For the second time... Ctrl-C doesn't work, neither does anything
else I tried. Does anyone know how I can end it?

Thanks,
Gijs van Swaaij
 
Try Ctrl+Break. On most keyboards the Break key is near the Print Screen and
Scroll Lock keys.
 
Gijs,
If you have some code that's causing this, try forcing a Save/Update of the Form/Data
before the code runs. Just until you get the code corrected...
Ctrl-C doesn't work, neither does anything
else I tried...
Please indicate what those are... so folks don't suggest solutions you've already
tried.

I've had some success with Ctrl-Break on inadvertent endless Loops.
 
Just a quick question: how can I kill an infinite loop without losing
my unsaved data? I'm asking because I just lost half an hour of work
after ending access with Task Manager, after it had entered an infinite
loop. For the second time... Ctrl-C doesn't work, neither does anything
else I tried. Does anyone know how I can end it?

Thanks,
Gijs van Swaaij

Ctrl-Break (often repeatedly).

John W. Vinson[MVP]
 
Gijs van Swaaij said:
Just a quick question: how can I kill an infinite loop without losing
my unsaved data? I'm asking because I just lost half an hour of work
after ending access with Task Manager, after it had entered an infinite
loop. For the second time... Ctrl-C doesn't work, neither does anything
else I tried. Does anyone know how I can end it?

Ctrl-Break always works if you happen to have a DoEvents in the loop.
Otherwise, you may have to click it over and over and over and just hope
something causes a break in the executing code so it can be sensed and
responded-to.

The fortunate thing is, if you code in a structured manner, VBA makes it
more difficult to create endless loops than it was, back in the "olden days"
in Assembler Language.

Larry Linson
Microsoft Access MVP

Larry Linson
Microsoft Access MVP
 
Hi Larry,
Looks like your "signature" on your last post got started on a loop... :-D
Al Camp
 
Thanks for all the advice! I just recreated an infinite loop, and
ctrl-break works.

Gijs van Swaaij


Al Camp schreef:
 
Back
Top