Advertisement

07.18.2008 at 08:37AM PDT, ID: 23577200
[x]
Attachment Details

Trapping an error when running a query in code with docmd.openquery

Asked by LennyGray in Access Coding/Macros

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 GrayStart Free Trial
 
Loading Advertisement...
 
[+][-]07.18.2008 at 09:02AM PDT, ID: 22037210

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 09:47AM PDT, ID: 22037691

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 10:10AM PDT, ID: 22037859

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 10:33AM PDT, ID: 22038035

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 10:43AM PDT, ID: 22038094

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.18.2008 at 03:32PM PDT, ID: 22040387

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2008 at 03:29AM PDT, ID: 22042085

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zone: Access Coding/Macros
Sign Up Now!
Solution Provided By: LSMConsulting
Participating Experts: 3
Solution Grade: A
 
 
[+][-]07.19.2008 at 03:29AM PDT, ID: 22042087

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.20.2008 at 07:28AM PDT, ID: 22045867

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.21.2008 at 11:03AM PDT, ID: 22052849

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628