restrict memo field entry length

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hey everyone, I need help with the following:
I have a table with a couple of memo fields, which will correspond on a form
and report. what i want is code that will not allow the user to type text
outside the physical boundaries of the field within the field. ie the memo
field is going to be 3 lines high. i don't want the user to be able to hit
enter past the bottom of the 3 lines and have the text continue to scroll
down. i know i can restrict the number of characters but i want to resctict
the number of lines able to be entered. thanx in advance for any help!!
 
aft3rgl0w said:
Hey everyone, I need help with the following:
I have a table with a couple of memo fields, which will correspond on a form
and report. what i want is code that will not allow the user to type text
outside the physical boundaries of the field within the field. ie the memo
field is going to be 3 lines high. i don't want the user to be able to hit
enter past the bottom of the 3 lines and have the text continue to scroll
down. i know i can restrict the number of characters but i want to resctict
the number of lines able to be entered. thanx in advance for any help!!


The number of lines occupied by some text depends on the
font and its related properties (FontSize, FontBold, etc) as
well as the width of the text box.

If you can keep a tight control on all that in any forms and
report where the text is displayed, then you can use the
fTextHeightWidth function at www.lebans.com to calculate the
height of the text as it will be displayed in the text box.
Use the Change event to check it as each character is
entered or the AfterUpdate event to check it after the user
is done entering the text.
 
Back
Top