<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 5.5.2653.12">
<TITLE>Jet SQL vs ADO (AXP)</TITLE>
</HEAD>
<BODY>
<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">Dear all</FONT></P>
<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">I have some code which attempts to open a query as an ADO recordset. The SQL statement underlying the query is this:</FONT></P>
<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">"</FONT><FONT SIZE=2 FACE="Arial">SELECT Avg(([CaseCasdet_1].[case_value]/[CaseCasdet].[case_value])*100) AS [OutlayRec%]</FONT></P>
<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">FROM (GFClosedCasesReport_Base INNER JOIN CaseCasdet ON GFClosedCasesReport_Base.case_id = CaseCasdet.case_id) INNER JOIN CaseCasdet AS CaseCasdet_1 ON GFClosedCasesReport_Base.case_id = CaseCasdet_1.case_id</FONT><FONT SIZE=2 FACE="Arial">"</FONT></P>
<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">The query runs fine and returns a value, but when attempting to open it as a recordset I get an error message;</FONT> <FONT SIZE=2 FACE="Arial">"</FONT><FONT SIZE=2 FACE="Arial">Join expression not supported</FONT><FONT SIZE=2 FACE="Arial">"</FONT></P>
<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">Can anyone see what is wrong with the</FONT> <FONT SIZE=2 FACE="Arial">SELECT statement? GFClosedCasesReport_base is a subquery but I have other queries based on this and they open in ADO without any problems.</FONT></P>
<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">TIA</FONT></P>
<P ALIGN=LEFT><FONT SIZE=2 FACE="Arial">Roz</FONT></P>
</BODY>
</HTML>