Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2009

    Unanswered: removing carriage return or line feed

    in my excel file below was displayed as per line:

    - Isolate Oil firing and confirm there is no diesel fuel oil leaking on the furnace.
    Under Standard Isolation No. 329
    (1U-OIL) for unit and SI No. 199
    (2U-OIL) for unit 2

    But when I imported it to my access table it was displayed as one liner and a small box character which i guess is the carriage return is displayed separating each line of charaters.

    How can I force access to display it like excel does (per line)?

    Your help is very much appreciated.

  2. #2
    Join Date
    Nov 2004
    out on a limb
    Provided Answers: 59
    run an update query that removes the symbols

    update mytable set mycolumn=replace(replace(mycolumn,chr$(10),""),chr$(13),"")
    the chr(10) represents the linefeed symbol
    13 the carriage return symbol

    you may need to insert another symbol, suc as a space to make human sense/legible
    update mytable set mycolumn = replace (replace (replace (mycolumn, chr$(10), "." ), chr$(13), "." ), "..", ". " )
    alternatively using regular expressions you could use the VBScript RegExp library to do a similar job
    I'd rather be riding on the Tiger 800 or the Norton

  3. #3
    Join Date
    Sep 2009
    Thanks for the quick reply.

    I already did the update query using the replace function, but what I want is that if the chr(10) and chr(13) are removed, the content of the column should be displayed per line.

    In Access or Excel, if you want the next sentence to be inputed on the next line you press CTRL-ENTER. Replacing the chr(10) and chr(13) with a zero length doesn't make sense because our end-users want it to be displayed on a per line basis like what they did in their excel file.

    Hope there is another way to replace these carriage return and linefeed symbol inorder for the content of the column are displayed per line. Inputing directly to the column using the CTRL-ENTER is okay.

Posting Permissions

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