Hi Ted, thanks for the reply. You are correct that Inlist(nTa,) is the fall over part. What surprised me was that the line would fail on the first part Case nTa > 0 , it was 0 (zero). The second part also AND !empty(this.termlist) which it is should have failed the case. Both of those should return .F. to the case. I can only assume that the VFP runtimes compiles as it goes and falls over with the Inlist before it can even think about the previous parts. I cheated anyway as I had to get it going by making tList "none" and changed the empty to <> "none", Anyway it worked so I am happy but I just wondered why it didn't work. Al
-----Original Message----- What does VFP do when it "falls over?" Mine usually stays upright, even whilst complaining. I'd suspect when you macro-expand tlist and it is an empty string, you're left with INLIST(nTa, ) which is a syntax error. instead, just before the CASE statement, make tlist = "Nonsense" + IIF(NOT(EMPTY(tlist)), ", " + tlist, SPACE(0)) That way, there is at least one non-empty element in tlist and it doesn't end with a comma when you macro expand it. _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/profox OT-free version of this list: http://mail.leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/011f01d094ce$309688d0$91c39a70$@com ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.

