error numbers and their descriptions

wazz

Super Moderator
Local time
Tomorrow, 02:59
Joined
Jun 29, 2004
Messages
1,711
is there a place that lists all the error numbers and their descriptions?
 
This'll list VBA errors...
Code:
Sub VBAErrMsgs()
On Error GoTo handler
   Dim i As Long
   
   For i = 1 To 746
      Err.Raise i
   Next i
   Exit Sub
   
handler:
   If Err.Description <> "Application-defined or object-defined error" Then
      Debug.Print Err & " " & Err.Description
   End If
   Resume Next

End Sub
 
tnx again.

FYI:
- the database (from microsoft link) lists over 32,000 errors; 2348 unique.

- how did you come up with 746? by running it and seeing the total, i presume, or some other way?

w.
 
Last edited:
Yup. Ran it to 5000 but it topped out at 746.
I later found an Access help entry under "Trappable Errors", which also lists those errors up to 746. In addition it lists errors 31001 to 31027 (or something), but I could not raise those in code and return the err.Description noted in the help article.
 

Users who are viewing this thread

Back
Top Bottom