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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Find Error Description

Status
Not open for further replies.

agfon

Programmer
Mar 25, 2005
38
0
0
US
I have an error number: -2147467259.

Is there a way to obtain the respective error description?

Something like...

MsgBox Err.Number = -2147467259

Results in...

"Not a valid file name."

Thanks in advance.
 
By-the-way, the error number -2147467259 was generated by an ADO object. Therefore, the AccessError(err#) method doesn't work.

 
Try this:

Err.Raise (-2147467259)
Msg = "Error # " & Str(Err.Number) & " was generated by " & Err.Source & Chr(13) & Err.Description

MsgBox Msg, , "Error", Err.HelpFile, Err.HelpContext

Hope this helps. :)
 
The ADO Connection object contains an Errors collection, see an example of how to use it here:

Extracting Error Information from ADO in VB

VBSlammer
redinvader3walking.gif

"You just have to know which screws to turn." - Professor Bob
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top