Alpha Video Training
Results 1 to 5 of 5

Thread: start "new line" in character field

  1. #1
    Member
    Real Name
    Kathy McMillan
    Join Date
    Oct 2008
    Posts
    1

    Default start "new line" in character field

    I have a 250 character field with word wrap option, but I need to be able to do a "hard return" to start a new line, so it looks like
    abcdefg
    rqlt1234
    so even though I have less than 250 characters (in the above example 14), I can put them in different lines without having to include manual spaces after line 1 to make is start on line 2.
    This is easy in a memo field, all I do is hit "enter" to start a new line, but I can't seem to find a way to do this in a large character field. Any suggestions?
    Thanks
    Kathy McMillan

  2. #2
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,314

    Default Re: start "new line" in character field

    Kathy, does the DBF format permit carriage returns in character fields? I think this data type is limited to alphanumeric characters only. -- tom

  3. #3
    "Certified" Alphaholic
    Real Name
    Mike Christensen
    Join Date
    Nov 2005
    Location
    Michigan U.P.
    Posts
    5,937

    Default Re: start "new line" in character field

    Tom, Kathy

    Adding a crlf() to a chararacter field works "somewhat" but I cannot get the field to automatically go to the next "line" as it were.

    I just added this to a button's OnPush event

    Code:
    dim nam as c
    nam = topparent:myCharacterfield.text
    topparent:myCharacterfield.text=nam + crlf()
    topparent.commit()
    It does for sure add a line but you have to click and doubleclick in the field on the next line to get the mouse cursor to be placed correctly. So am afraid it is just one of those types things that is going to be kludgy and may never work quite right....fiddled around with it too much already! :)

    Note--odd too in that once you add an additional line to the field that would be out of visual sight, Alpha places the list box type scroll bar on the field to be able to see the line(s).
    Mike
    __________________________________________
    It is only when we forget all our learning that we begin to know.
    It's not what you look at that matters, it's what you see.
    Henry David Thoreau
    __________________________________________




  4. #4
    "Certified" Alphaholic
    Real Name
    Tom Cone Jr
    Join Date
    Apr 2000
    Location
    Florida
    Posts
    23,314

    Default Re: start "new line" in character field

    Mike, I think it's asking for trouble to embed carriage return and line feed characters in simple character fields. Just because something "can" be done doesn't mean it "should" be done. Control code characters are not alphanumeric characters.

  5. #5
    "Certified" Alphaholic Tom Henkel's Avatar
    Real Name
    Tom Henkel
    Join Date
    May 2002
    Location
    New Jersey, USA
    Posts
    1,880

    Default Re: start "new line" in character field

    Kathy,

    Is this so that a report or letter can display the information in some sort of coherent column?

    If so, then you may want to take the field, and separate the "words" in the field by a space, then on the report, bring the field into a calculated field and then use the strtran() function to convert the spaces to a chr(13). This will move the "words" down in a column of sorts. I would place this calculated field into a rich text field on the report or letter.

    Tom

Similar Threads

  1. How to find: "Error:line:6 Missing right parenthesis"
    By Easy Rider in forum Application Server Version 9 - Web/Browser Applications
    Replies: 10
    Last Post: 10-08-2008, 05:14 PM
  2. "Add" and "Save" buttons don't stay on "Self" page
    By Scholin in forum Application Server Version 8
    Replies: 2
    Last Post: 02-05-2008, 08:50 AM
  3. Field rule lookup - select "A"; enter "X"
    By CALocklin in forum Alpha Five Version 8
    Replies: 5
    Last Post: 01-24-2008, 04:45 PM
  4. Calendar addin "Genie line:584"
    By Ray Farland in forum Alpha Five Version 5
    Replies: 1
    Last Post: 08-04-2003, 04:57 PM
  5. kill "Table: Table_name" on status line
    By richarddsmith in forum Alpha Five Version 5
    Replies: 7
    Last Post: 10-02-2002, 02:52 AM

Bookmarks

Posting Permissions

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