Can't CTRL-Break into code this time

  • Thread starter Thread starter M Skabialka
  • Start date Start date
M

M Skabialka

I created a new form (Access 2003), added lots of code and <sigh> didn't
save it. In testing the code I added a break and commented out the error
handler line that exited the code and made it resume instead. As I was
testing I was correcting code. Anyway, I got rid of the break and let it
run but it got stuck in the error handler on a syntax error. I pressed my
usual CTRL-Break to break into the code but it just continues to show the
error message - it won't break into the code as it always has before. From
the code module I am unable to edit the code because the error message
hasn't been acknowledged (it has - but instantly reappears).
Is there any other way to break into the code before I have to crash Access
and start over on that form?
Mich
 
You're clicking the Debug button on the error message dialog box? Or is
there no such button because the error message is a custom one generated by
the code itself?
 
It's Msgbox "Err.Number & " " & Err.Description
When I hit CTRL-Break or click OK on the Msgbox window, the Msgbox comes
right back. If I click on anything in the Access window or the code window
I get a beep.
 
Yes, you are in a loop that cannot be broken except by killing the database.
However, try this just in case: when the MsgBox appears, press Ctrl+Break
to see if the code will "break" at that point.

The likely reason why Ctrl+Break isn't working for you otherwise is that
ACCESS has already displayed (or is getting ready to display) the MsgBox,
and at that time it's probably ignoring the Ctrl+Break input because the
code runs too quickly.
--

Ken Snell
<MS ACCESS MVP>
http://www.accessmvp.com/KDSnell/
 
I tried CTRL-Break in many ways and as fast as I could press the keys, but
I had to crash out and start over - 2 hours of work down the drain, but the
second time round it was much faster because I had already bypassed any
stumbling blocks in my thought process! No more bypassing error handler by
using Resume - I should have left the break there in the error handler or
had it resume next, or exit out.
Mich
 
Back
Top