MartyConnelly
martyconnelly at shaw.ca
Thu Jul 28 13:06:18 CDT 2005
When I get one of these I look for reserved words and do a debug.print strSQL "And all is revealed" It sure beats having to look through a 200 page hexadecimal dump printout.. Kaup, Chester wrote: >Thnaks everyone. Another set of eyes looking sometimes helps. > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Bobby Heid >Sent: Thursday, July 28, 2005 11:37 AM >To: 'Access Developers discussion and problem solving' >Subject: RE: [AccessD] Missing Operator in Query > >For that matter, there are missing spaces at the end of many of the >lines. > >Bobby > >-----Original Message----- >From: accessd-bounces at databaseadvisors.com >[mailto:accessd-bounces at databaseadvisors.com] On Behalf Of Heenan, >Lambert >Sent: Thursday, July 28, 2005 12:28 PM >To: 'Access Developers discussion and problem solving' >Subject: RE: [AccessD] Missing Operator in Query > > >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 > > > -- Marty Connelly Victoria, B.C. Canada