Limit number of lines in a Memo box on form

mousemat

Completely Self Taught
Local time
Today, 15:08
Joined
Nov 25, 2002
Messages
233
How can I limit the number of lines of text in the memo field on a form.

Or to put it another way, when pressing return whilst inputting notes, how can I add the number of characters that have not been typed in that line?

Basically my report is big enough for 1260 characters over 18 lines of text, however, pressing the return key when typing in the memo field on the form only advances the counter by one character. So I guess really I am looking to limit the memo textbox to only 18 lines of text with a maximimum of 70 characters per line.
 
You'll have to count the characters, and then you';ll still have a problem as each character isn't the same width.

Why not just let the control display what it displays, without scroll bars?
 
Thanks for your reply. Not using the scrol bars wont really help.

I have already designed the form so that the control is the correct size, ie 18 lines down. I just need to be able to limit the number of lines users can type into as 18 lines.
 
The trouble, I can still type into the box even without the scroll bars, it still keeps scrolling up
 
Big deal . . . You user(s) eill quickly figure out what's going on.
 
indeed they will. Thanks for your assitance. Much appreciated
 
not tested, but you can probably do it with the split() function to turn the text into an array based on the cr, then you could use Ubound() to calculate the number of rows and even step through the array to check the length of individual rows.

HTH

Peter
 
possible solution

below is a link to stephans site......he seems to be really good with these type of questions.......though the only drawback and its a pretty big one, but it is fixable. u need access 1997. i myself have tried opening it, but i have as of yet to succeed.

it is a sample db and well i didnt code it. if u manage to open it and view the info then please share how if u have an access program over 97. i am curious myself to see it once again. please note i have opened it before, i think, but dont recall how to as of now being that it has been a couple months since last checkin it out.

hope it helps in some way or form. good luck!:)

http://www.lebans.com/limitcharsmemo.htm
 

Users who are viewing this thread

Back
Top Bottom