>>lcString = LEFT(lcString, LEN(ALLTRIM(lcString))-4)
>
>
>I'm sure it was an oversight, but for the benefit of the "newbie", if you're going to ALLTRIM() in the LEN(), you'll need to ALLTRIM() in the LEFT() as well.
>
>lcstring=LEFT(ALLTRIM(lcstring), LEN(ALLTRIM(lcstring))-4)
Yes, that's correct if you have spaces in the beginning of lcString. If spaces are only at the end (which is often the case for values from character fields) it does not matter.
Nick Neklioudov
Universal Thread Consultant
3 times Microsoft MVP - Visual FoxPro
"I have not failed. I've just found 10,000 ways that don't work." - Thomas Edison