Continuing Execution After a Runtime Error
As you are testing, you often discover runtime errors that are quite easy to fix. When a runtime error occurs, a dialog box similar to the one shown in Figure 15.19 appears.
Figure 15.19. You can fix runtime errors from the Runtime Error dialog box.

If you click Debug, Access places you in the Code window on the line that generated the error. After rectifying the problem, click the Continue button on the toolbar, or choose Run, Continue.Figure 15.20 shows a divide-by-zero error, for example, after the user clicked Debug from the Runtime Error dialog box. The Locals window in the figure shows that the programmer set the value of int2 to 20. Code execution now can continue without error.
Figure 15.20. Here is the Debug mode after a divide-by-zero error.

Often, after an error occurs, VBA displays a message giving you the option of resetting your code. If you opt to reset your code, all variables (including Publics and Statics) lose their values. You also can click Reset on the toolbar. You must decide whether it is better to proceed with your variables already set or to reset the variables and then proceed.Chapter 16, "Error Handling: Preparing for the Inevitable," covers the options available to you.