Jim,
My intention was opposite. I want that users type 5 digits only - no dots, commans, minus/plus, etc. Right now I changed my code this way:
if len(lcString)<>5 or !IsNumeric(lcString)
=messagebox(...)
return .f.
endif
where lcString is user's input (in editbox) and IsNumeric is George's function.
>>
>>Sorry for my prev. message, I haven't read yours carefully. '123 ' it's not the case, because I'm using alltrim, but -/+ does. But I can simply add
>>and !'-'$lcString or !'+'$lcString
>>
>>Right?
>Nadya,
>
>Or you could use the TYPE() function and it will work everytime without any special coding.
>
>lcVar = "123"
>TYPE(lcVar) = "N"
If it's not broken, fix it until it is.
My Blog