PDA

Click to See Complete Forum and Search --> : new lines


alexmac
Feb 15th, 2001, 10:56 AM
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

Feb 15th, 2001, 04:10 PM
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

alexmac
Feb 16th, 2001, 04:58 AM
Thanks Paul thats perfect!

Alex