Limiting form text box to 10 lines

  • Thread starter Thread starter Keith Ward
  • Start date Start date
10 lines ... no matter the length of the line? ( a bit subjective .... )

If you know the maximum number of characters that you want to allow, you can
set the limit of a text field to that many characters (so long as you don't
use memo format).

Or you could use the OnChange event of the textbox to continually test the
number of carriage return/line feed pairs that are in the ".Text" property
of the text box and not let the entry continue if the number is ten or more.

Or you could let the user type in all the info and then use the BeforeUpdate
event to test the "length" of the text by counting the number of carriage
return/line feed pairs that are in the ".Value" property and then either
allowing the upate or rejecting it.

Just some ideas....
 
Back
Top