>Thanks guys for your help. I should have realized that was the problem. I am using two SUBSTR()'s Is there any way to tell VFP to only take the specified number of characters if it is available, and if not, just take all the characters in the field?
>
>Thanks again,
>Eric
You can omit the third parameter in Substr(), so it takes whatever it finds from the offset you gave, to the end of string. Thus, Substr("abcdef",3,2) gives you "cd", but Substr("abcdef",3) gives "cdef".
Nevertheless, Substr("abcdef",9,2) will surely give you an error. You should test for the length of the string first.