SQL Query on ODBC Connection Crashes Access

aladrach

Registered User.
Local time
Today, 06:28
Joined
Jul 1, 2011
Messages
34
Whenever I run the following criteria on my ODBC SQL connection, Access closes with the error "Access has stopped working". If I run the same query on a local database, it works fine. If I run the full query without that criteria on my ODBC connection, it works fine as well. Only with this code segment does it crash, and only when connected to the ODBC server.

Any ideas?

Code:
WHERE [Time Table].[Order Number]  In
(SELECT DISTINCT [Order Number] FROM [Time Table] AS Q1 WHERE exists
 (SELECT DISTINCT [Part Number] FROM [Time Table] AS Q2 WHERE [Part Number] NOT IN 
(SELECT DISTINCT [Part number] 
FROM [Time Table] AS Q3
WHERE [Location]='Shipped' AND Q2.[Order Number]=Q3.[Order Number])  AND Q2.[Order Number]= Q1.[Order Number] ))
 

Users who are viewing this thread

Back
Top Bottom