O'Reilly logo

F. Scott Barker's Microsoft® Access 2000 Power Programming by F. Scott Barker

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

EXAMINING ACCESS'S RUNTIME ERROR HANDLING

When working with Access's error handling, look at each command that can be used: On Error, Exit, and Resume.

Using the On Error Command

The On Error command lets you specify exactly where you want Access to proceed to when an error occurs. Following are the variations of the On Error command used to direct program execution.

The On Error Goto Statement

To control error handling, you must take over for the default handler by issuing the On Error Goto statement:

On Error Goto LineNumber|LineLabel
							

The On Error Goto statement has two options:

  • LineNumber can be a number placed in your routine.

Note

Although VBA lets you use line numbers to specify lines to go to, it's not good practice to do so. Goto tends ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required