Click to See Complete Forum and Search --> : Text Control for Access


ranjistinos
01-23-2006, 11:15 AM
Hello there

I wonder if someone can help…

Basically I am pulling text out of an Access Database to be displayed on my page. As this text contains more than 255 characters I have changed the field to a ‘memo’ field as opposed to a ‘text’ field.

It seems to pull the information out fine, but how would I insert paragraphs and control the text how I want it on the page?

Could an alternative be including a text file, but again, how do I break the text into paragraphs?

Thanks in advance…

ProWeb
01-23-2006, 12:06 PM
Enter the text into your memo field in HTML format with tags in place.
This way when you Output the text it will come out exactly as you want it.....

Bullschmidt
01-23-2006, 07:57 PM
Here's what works for me (although I usually put it into its own function):

' Fix HTML.
varFld = Server.HTMLEncode(varFld)

' Convert each space and space to space and  
varFld = Replace(varFld, " ", "  ")

' Convert all vbCrLf to <br>.
' (This is the same as converting Chr(13) & Chr(10) to <br>.)
varFld = Replace(varFld, vbCrLf, "<br>")