AccessBlog.net

News, links, downloads, tips and tricks on Microsoft Access and related

About Me Search
Alex
Name:Alex Dybenko

Location:Moscow, Russia

Friday, February 11, 2011

Debug-friendly Error handler

Recent discussion in Microsoft forums brings attention to old good trick, which was not mentioned here.

Each procedure should have an error handler; else you get application crash in runtime environment. But, when error occurs, you just get your MsgBox, describing error and that’s all. How to debug then? Add Resume statement after your Resume MyProc_End, and when you get MsgBox – press Ctrl+Break, move execution point to Resume and press F8 to go to Error line:

image

Ok, another option – is to use Global Error Handler, where you can even easier switch to error line.

Labels: ,

1 Comments:

Anonymous Brandon said...

Great tip, Alex! I always wondered why the command button wizard created the Proc_End segments when all they did was end the function.

1:05 AM  

Post a Comment

Links to this post:

Create a Link

<< Home