>>>The following code produces an error in VFP6, but not in VFP5:
>>>
>>>SELECT submits.specno+"-"+submits.submno AS Index, LEFT(submits.descript,50) AS Description,;
>>> 0 AS statusno, {} AS datercvd;
>>> FROM submits ;
>>> WHERE Submits.ProjNo = mbhProjNo;
>>> AND Submits.ProjNo+Submits.SpecNo+'-'+Submits.Submno
NOT IN ;
>>> (SELECT History.ProjectNo + History.SubmitNo FROM History) ;>>> ORDER BY 1, 4;
>>> GROUP BY 1;
>>> INTO CURSOR step1
>>>
>>>It appears to be coming from the 'NOT IN' section which should be highlighted above. Is there something new in SQL which is tripping me up?
Another shot in the dark (your darkness will, at least, have lots of holes in the end): try
AND NOT Submits.ProjNo+Submits.SpecNo+'-'+Submits.Submno
IN ;
(SELECT History.ProjectNo + History.SubmitNo FROM History) ;i.e. put the negation operator before the condition it negates. Maybe the parser will swallow it.