Dragan,
The focus of the post was really to be able to determine the length of the user input for a character field including leading and trailing spaces.
I was checking thru the properties and built-in VFP 7 functions and could not find one.
>>Is it possible (without using keypress) to determine the # of characters (including trailing blanks) in a field?
>>For example, I have a field in an form (no control source) that has an input mask of =replicate('X',30). If 'abc' or 'abc ' is input, the length of this.value is 30. If I check the length of the alltrim, it is 3, of course.
>>Or to present the question another way ... How would I determine * exactly * what the user entered?
>>TIA.
>
>After having read pretty much everything in the thread so far... why do you have this input mask? Want to have no more than 30 characters?
>
>You can do that in InteractiveChange, by simply checking the length of this.value, and chop if longer, then pass focus to next object. And with no .InputMask, you can set this.value=allt(this.value) in .gotfocus, so the length of this.value will be the length you want. No dirty tricks.