When I run a query using docmd.openquery queryname, if an error occurs, a dialog will appear. To keep things neat, I usually set warnings off and let the query run. However in this instance, I would like the program to know that an error existed but still let the query run. With the knowledge that the error existed (usually duplicate records), the program can execute a task.
How can I know what the error was without raising a dialog and clicking on "No".
Thanks,
Lenny Gray
Start Free Trial