Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Handling errors 2

Status
Not open for further replies.

NewTexican

Technical User
Dec 10, 2004
95
US
Is it possible/good idea to have a private sub in my code that handles errors for multiple subs? Can anybody point me to a place that has a list of the error numbers? I'm looking for what number corresponds with "you can't go to the specified record" Gracias.
 
HitechUsers link seems good.

Some additional info:

2105 is the errornumber for the error you mention, To get the error number for some error, include that in the errorhandler:

[tt]msgbox err.number & " " & err.description[/tt]

To get the errormessage from the different errornumbers, you can use the AccessError() method:

[tt]debug.print accesserror(2105)[/tt]

You can build your own list thru looping from 1 to N and get the AccessError.

There's some information available in the help files, for instance the topic "Elements of Run-Time Error Handling". RickSpr also has a very good explanation on errors here thread222-52018 (VB5/6 forum)

Roy-Vidar
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top