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
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.