Heenan, Lambert
Lambert.Heenan at AIG.com
Thu Jul 28 11:27:57 CDT 2005
Could it be the very last couple of lines?... Cum_Wateri_hcpv, Fluid, Comment" & _ "ORDER BY Cum_Toti_hcpv;" ... There's no space after 'Comment' so this string winds up being "Cum_Wateri_hcpv, Fluid, CommentORDER BY Cum_Toti_hcpv;" Lambert -----Original Message----- From: accessd-bounces at databaseadvisors.com [mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Kaup, Chester Sent: Thursday, July 28, 2005 12:08 PM To: Access Developers discussion and problem solving Subject: [AccessD] Missing Operator in Query The following SQL returns a missing operator message yet if I put it in the query grid all is good. That is a semi colon at the end even though hard to see. Maybe I am just going blind from looking at it and not seeing the error. strSQL = "SELECT concate, [tbl Patterns].[WAG Scheme], Cum_Toti_hcpv, Cum_CO2i_hcpv, Cum_Wateri_hcpv, Fluid, Comment" & _ "FROM [tbl Patterns]" & _ "INNER JOIN [tbl WAG] ON [tbl Patterns].[WAG Scheme] = [tbl WAG].[WAG Scheme]" & _ "WHERE Pattern = '" & PatternName & "' " & _ "GROUP BY concate, [tbl Patterns].[WAG Scheme], Cum_Toti_hcpv, Cum_CO2i_hcpv, Cum_Wateri_hcpv, Fluid, Comment" & _ "ORDER BY Cum_Toti_hcpv;" Set MyQDef1 = MyDb.QueryDefs("qry Pattern WAG Scheme") MyQDef1.SQL = strSQL Set myds1 = MyQDef1.OpenRecordset(). Chester Kaup Engineering Technician Kinder Morgan CO2 Company, LLP Office (432) 688-3797 No trees were killed in the sending of this message. However a large number of electrons were terribly inconvenienced. FAX (432) 688-3799 -- AccessD mailing list AccessD at databaseadvisors.com http://databaseadvisors.com/mailman/listinfo/accessd Website: http://www.databaseadvisors.com