Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
How to stop when the field length is reached
Message
From
08/07/2002 12:52:48
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00676137
Message ID:
00676206
Views:
17
This message has been marked as the solution to the initial question of the thread.
< 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!

Previous
Next
Reply
Map
View

Click here to load this message in the networking platform