< snip >
>If doesn't seem to work. For instance, I have a textbox with controlsource BldMstr.Page (it's an integer field). I set MaxLength to 2 (for testing sake), but it still allows me to type 7 digits.
>
>I tried the following code in textbox InteractiveChange:
>
>if len(alltrim(this.text))>this.MaxLength
> nodefault
>endif
>
>But it doesn't work either.
>
>What else can I do? May be set confirm ON in interactive change? (Back to off in GotFocus)?
From VFP help:
MaxLength only applies for a text box when MaxLength is greater than 0, the text box does not use the InputMask property, and its Value property is of character type.Checking on Keypress event? InputMask?
Zlatin Zlatev,
MCSD (VS6)Make solutions, not programs!