Count # lines in word-wrapping Text Box

P

Paul Johnson

I have a large text box on a data entry form that displays up to 18 lines of
continuous text, to emulate the size of the output text box on a report.
The uneducated user will not notice that as they type at the bottom of the
form's text box, the text at the top of the box has scrolled out, so they
are sending more than the maximum number of printable lines to the report's
text box. There is no error message, of course, just truncated data in the
report.

To make this form more user-friendly, I would like to have an alert when the
text in the control exceeds 18 lines, but since it is a single text field,
it depends on where the control wraps the lines, so it is not as simple as
evaluating len([text]).

Since the size of the box is fixed in the report (a standardized military
form) is not flexible, I have set the scroll bars property in the text box
to false, but I am wondering if the event that fires to activate scroll bars
would be the key to my solution.

Any suggestions?

TIA
Paul Johnson
Alexandria, VA
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top