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] [bigglasses] [bigglasses]](/data/assets/smilies/bigglasses.gif)
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] [bigglasses] [bigglasses]](/data/assets/smilies/bigglasses.gif)