You're right, Duane -- no luck using subqueries in the IN clause.
Any other ideas? Know of any limitations on the size of the SQL string that I might be hitting, or anything else I can trap before the app crashes?
Thanks,
David
Thanks for the reply, Duane.
No, I'm sure it is not approaching the 255 column limit. And the query works fine within Access directly, so I know there are no issues with bad characters or records not matching the values.
I found a website that illustrates using subqueries within "IN (...)"...
I have a fairly complex crosstab query that is created via DAO code in a VB6 app. The query is saved in a Jet 4.0 database, and when I run it directly from within Access 2003 it runs fine; but when I run it from within the VB6 app, I get an Application Error which crashes the IDE:
vb6.exe -...
Thanks, Leslie, but there was a syntax error in your SQL. However, I did figure it out with the help of a colleague (see below). Thanks for the help!
SELECT Product, Sum(SalesmanRevenue) AS TotalRevenue, Count(Salesman) AS NumSaleman, Sum(SalesmanRevenue)/Count(Salesman) AS AvgPerSalesman...
Thanks, Leslie, but unfortunately that will not work because it does not count the unique number of Salesman for each Product. In other words, it returns:
Product TotalRevenue NumSalesman AvgPerSalesman
Fork 45 4 11.25
Knife 26...
I have a VB6 app that executes a crosstab query on a Jet database. However, this query takes 10-20 seconds to complete, and I would like to give the user more feedback during the process than merely an hourglass mousepointer. I have added an animated dialog similar to the Windows...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.