Here is something I just thought of. It might do the trick for you.
I calculate how many lines based on two factors,
one how many actual chr(13)'s are in the edit box,
two how many lines there would be based on the current memowidth settings / how many char there are in the edit box,
and return the larger number.
m_calc_lines = LEN(TRIM(thisform.edit1.Value)) / SET("memowidth")
m_actual_lines = OCCURS(CHR(13),thisform.edit1.Value)
m_max_lines = MAX(m_calc_lines,m_actual_lines)
? m_max_lines
who knows, it might just work for you. (it works in my little test form I just made. ?
Bob Lee
In the beginning, there was a command prompt, and all was well.