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

Enumerating Errors Collection

Status
Not open for further replies.

boggg1

Programmer
Oct 17, 2002
102
EU
I used to enumerate errors using something like...

On Error Goto ErrorHandler
...

ErrorHandler:

Call DisplayError
Resume ...

End Sub
________

Public Sub DisplayError

Dim ErrLoop As Error

For Each ErrLoop In Errors
msgbox ErrLoop.Description
Next

This still works on an old backup but at some stage (I think when I converted DAO to ADO) this stopped working on my latest versions. The error is "Variable not defined" pointing to "Errors" in the "For each..." statement. I can apparently enumerate the ADO errors collection (con.Errors) but how do I get to the Visual Basic errors collection that used to be called Errors.

Also why did this break ?. It has to be trivial.

Boggg1
[bigglasses]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top