Format Text (out of a Database)

Results 1 to 2 of 2

Thread: Format Text (out of a Database)

  1. #1
    Variable Guest

    Default Format Text (out of a Database)

    How do I format the text out of a access-memo-field so it is NOT displayed as one long line but that it rather brakes at the end of the table (and so that words aren&#039;t just seperated in the middle). <BR>I already did a search in this forum and came up with this answer but I don&#039;t understand it fully: <BR><BR>response.write Replace(rs.Fields("memofield"),vbcrlf," <BR>" & vbcrlf) <BR><BR>Currently I just use this and it "wrecks" ;-) my whole table: <BR>&#060;%=(Articles.Fields.Item("text").Value)%& #062; <BR><BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Format Text (out of a Database)

    Format HTML<BR>&#060;%<BR>&#039;first create a function to replace the chr 10 & 13 with linebreaks<BR>Function FormatStr(String)<BR>&nbsp;&nbsp;on Error resume next<BR>&nbsp;&nbsp;&nbsp;&nbsp;String = Replace(String, CHR(13), "")<BR>&nbsp;&nbsp;&nbsp;&nbsp;String = Replace(String, CHR(10) & CHR(10), "&#060;P&#062;")<BR>&nbsp;&nbsp;&nbsp;&nbsp;St ring = Replace(String, CHR(10), "&lt;BR&gt;")<BR>&nbsp;&nbsp;FormatStr = String<BR>End Function<BR>%&#062;<BR>Then call it like this:<BR>&#060;%=formatStr(rs.Fields("memo_field") )%&#062;<BR><BR><BR>Hope this helps... Cheers!

Posting Permissions

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