>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
Eric,
The LEN(cString) function returns the length of any string in VFP. Sure you can do what you want to;
If the maximum no. of chars you want to extract from your string is n, then,
cExtract = IIF(LEN(cString) < n, SUBSTR(cString, 1), SUBSTR(cString, 1, n))
Sanjay
Sanjay Kapoor
Relatively speaking is a conversation with Einstein