how to do error handling in access vba

The solution for “how to do error handling in access vba” can be found here. The following code will assist you in solving the problem.

1 Sub|Function SomeName()
2 On Error GoTo Err_SomeName ‘ Initialize error handling.
3 ‘ Code to do something here.
4 Exit_SomeName: ‘ Label to resume after error.
5 Exit Sub|Function ‘ Exit before error handler.
6 Err_SomeName: ‘ Label to jump to on error.
7 MsgBox Err.Number & Err.Description ‘ Place error handling here.
8 Resume Exit_SomeName ‘ Pick up again and quit.
9 End Sub|Function

Thank you for using DeclareCode; We hope you were able to resolve the issue.

More questions on [categories-list]

Similar Posts