PDA

View Full Version : querydef won't execute



BrianMH
01-24-2012, 05:42 AM
Hi,

I am hoping someone has had a similar issue and can tell me a solution. I have a query that executes just fine by double clicking it or by hitting the red ! to execute. However for some reason it will not work using the querydef.execute method. It says data type mismatch in criteria expression. What I cannot figure out is why this would fail only when running it through the execute method of the querydef object.

Thanks

BrianMH
01-24-2012, 05:59 AM
Interestingly enough I found the error in the query and it is resolved. However I am still curious as to why manually executing the query gives no error whereas programatically produces one.

hansup
01-24-2012, 12:02 PM
That seems odd to me, too. Although it may be a long shot, I will suggest you show us the SQL for the query and the section of your code which calls the execute method of the querydef.