Hi Tuvia.
Can you try the following and see what you get?
lcStr = "Zip Code"
lcSub = Left(M.lcStr, 3)
?M.lcSub, At(M.lcSub, M.lcStr)
That should be pretty much fool proof. There should be no way that unseen characters or codde pages shoudl be able to screw that up.
If that returns 0 then I'd have to suggest reinstalling VFP as it might be damaged.
Ian Simcock.
>I get a return of 0.
>
>
>>With
>>
>>lx = "Zip Code"
>>ly = "Zip"
>>?at(ly,lx)
>>
>>
>>I get a return of 1 in VFP 9 SP1