MartyConnelly
martyconnelly at shaw.ca
Thu Aug 3 15:40:50 CDT 2006
If you intended a wildcard Like '" & PID* & "')) should be Like '" & PID & "*')) Kaup, Chester wrote: >The following SQL gives a syntax error of compile error expected >expression when it gets to the & in this part And ((ConfigMaster.PID) >Like '" & PID* & "')). I don't see the problem. PID is text. > > > >strSQL = "SELECT ConfigMaster.PID, Count(ConfigMaster.PID) AS CountOfPID >INTO [tbl Pattern Occurances] " & _ > > "FROM [tbl Producers in a Scaleup Pattern] " & _ > > "INNER JOIN ConfigMaster ON [tbl Producers in a Scaleup >Pattern].ChildPID = ConfigMaster.ChildPID " & _ > > "WHERE ((([tbl Producers in a Scaleup Pattern].PID)= '" & >PatternName & "' And ((ConfigMaster.PID) Like '" & PID* & "')) " & _ > > "GROUP BY ConfigMaster.PID;" > > > >Chester Kaup > >Engineering Technician > >Kinder Morgan CO2 Company, LLP > >Office (432) 688-3797 > >FAX (432) 688-3799 > > > > > >No trees were killed in the sending of this message. However a large >number of electrons were terribly inconvenienced. > > > > > -- Marty Connelly Victoria, B.C. Canada