Text Control for Access
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…
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.....
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>")
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)