Results 1 to 3 of 3

Thread: Count

  1. #1
    Join Date
    Jul 2003
    Location
    Portugal
    Posts
    111

    Unanswered: Count

    Is possible to know the amount of lines that somebody has written in a memo field?

    I would like to say user he cannot write more than 28 lines.

    But how can I control this (if this is possible...)?

    Thank you

    Ruas

  2. #2
    Join Date
    Jul 2003
    Location
    Amsterdam, Nederland
    Posts
    450

    Question count line's

    if you set the field size of a memo box to 500 character's you can press the enter key 500 times

    if you want to count the crlf character's (this is: char return line feed)
    you can count the chr(10) in the string with a loop


    better to count all the character's with
    len(me.text1.value) or len(me.text1.text) if you use .text first set the focus

    this will give you the count off all character's in text1

  3. #3
    Join Date
    Jul 2003
    Location
    Portugal
    Posts
    111
    You say there is not a way to count lines, but only a way around to solve the problem. Is that right?

    I never saw code to make this.

    Here the problem is not the amount of characters, but the amount of lines.

    If some characteres are not enough space in the memo field line, a linefeed chr(10) is already something. Carriage return Chr(13), too.

    Well, let us see what I can do with this...

    Thank you for your idea.

    Ruas

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •