Getting Run-time errors descriptions
This is from the post of Dirk Goldgar, Access MVP, I saw the question in newsgroups, but forgot about this AccessError() function. Keeping it here. It only works on English Access, so for localized version you have to adjust it.
Dim strErrDesc As String
For i = 1 To 65535
strErrDesc = Error(i)
If strErrDesc = "Application-defined or object-defined error" Then
strErrDesc = AccessError(i)
End If
Print #1, i & ", " & strErrDesc
Next i
Labels: Access
1 Comments:
This is a helpful little function. Hate for users to see the generic error messages Access generates. It is useful to capture an error and based on the results, show your users a more descriptive message.
Post a Comment
<< Home