Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

returns the number of lines 1

Status
Not open for further replies.

astonmak

MIS
Feb 14, 2003
41
0
0
CN
Hi all,

Is there any function/way to returns the number of lines in a memo field, just like function MEMLINES() in VFP.

THANKS
ASTON
 
Off the top of my head I can't think of one, but I would probably count the vbCrLf characters in the file (then add 1, since there won't be one on the last line of the file). Keep in mind this will count the "true" number of lines, including empty lines (just the vbCrLf character).
 
Hi Nagrom,

Are u saying read each character in the file, then one line will be added once u meet vbCrLf?

Aston
 
No, what was said was to count the number of vbCrLf characters that appear in the memo and don't forget to add one (1) more to the total because the last line is not necessarily returned with the CRLF sequence.

Also, you do not have to read each character. Take a look the SPLIT function in the help files. This is a very good hint as to what you may want to use.

If you still don't understand where to place it, post your code and we'll assist you if we can.

--MiggyD
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top