>Nicholas,
>Your code certainly looks OK. Here's a sample using real tables and fields. It worked fine, giving me the correct 5 records.
>SELECT coid from coheader where coid NOT IN ;
> (SELECT cd_coid from codetail WHERE !cdid = cd_coid) ;
> into cursor atemp
>
The only thing I can think of is to put the code into a single string to see if you have an extra comma or missing semicolon.
>
>Barbara
>
I got the code working. I have no idea why the example I showed did not work the first time. I may have gotten confused with some other tests use the new-fangled JOIN and its related statements. Unfortunately these appear to be junk. I have never been able to make them work. I even copied the statements from the View Designer and just make one change and everything blows up. They appear to be useless.