G
Guest
I'm a little confused regarding the following:
DBEngine.Errors.Count : for which you cannot return a description
Errors.Count : for which you cannot return a description
Err : which seems more robust, but is this only for VBA errors?
Is there a way to separately handle: DAO errors; ADO errors; and VBA errors?
My thought is that in some cases there could be multiple errors encountered.
So I would like to be able to have a generic error function that is called
(using On Error Goto...) to process those errors I do not specifically trap.
This generic error function should:
1) Loop thru and display each DAO error in a message, then clear all DAO
errors; if no DAO errors were encountered, then skip to #2 below:
2) Loop thru and display all ADO errors in a message, then clear all ADO
errors; if no ADO errors were encountered, then skip to #3 below:
3) Loop thru and display all VBA errors in a message, then clear all VBA
errors; if no VBA errors were encountered, then go on to any other type of
errors (are there any?) and quit.
Can someone please post example code that would accomplish this? Or point me
to a web site that does a good job explaining it and showing examples?
Thanks.
DBEngine.Errors.Count : for which you cannot return a description
Errors.Count : for which you cannot return a description
Err : which seems more robust, but is this only for VBA errors?
Is there a way to separately handle: DAO errors; ADO errors; and VBA errors?
My thought is that in some cases there could be multiple errors encountered.
So I would like to be able to have a generic error function that is called
(using On Error Goto...) to process those errors I do not specifically trap.
This generic error function should:
1) Loop thru and display each DAO error in a message, then clear all DAO
errors; if no DAO errors were encountered, then skip to #2 below:
2) Loop thru and display all ADO errors in a message, then clear all ADO
errors; if no ADO errors were encountered, then skip to #3 below:
3) Loop thru and display all VBA errors in a message, then clear all VBA
errors; if no VBA errors were encountered, then go on to any other type of
errors (are there any?) and quit.
Can someone please post example code that would accomplish this? Or point me
to a web site that does a good job explaining it and showing examples?
Thanks.