Results 1 to 3 of 3

Thread: new lines

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    UK
    Posts
    164
    Okay I have a form with a multi line text field box. This data is sent to a script that insets it into a database. The data is stored in an Access database in a memo field.
    How can I retain the formating as when the data is read out again returns are interpreted as spaces.

    Thanks,

    Alex

  2. #2
    Guest
    Assuming your multi-line textbox contains carraige-return/linefeeds and you want to display the data as normal HTML while preserving the format you can do a Replace() on your text to substitute vbCrLF's for HTML <BR>'s. Something like:

    strToDisplay = Replace(strData, vbCrLf, "<BR>")

    This will only work if there are hard returns in the data. Soft Returns (those forced by wrapping) won't be interpreted as vbCrLf's.

    Paul

  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Nov 2000
    Location
    UK
    Posts
    164
    Thanks Paul thats perfect!

    Alex
    ASP, SQL, VB6, Java Script and dubious guitar playing skills.

Posting Permissions

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



Click Here to Expand Forum to Full Width