Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Line breaks in database

Status
Not open for further replies.

Stoemp

Programmer
Sep 25, 2002
389
BE
Hi,

I'm using an Access database to store my information used on the website. I have certain texts where I put in some line breaks (ctrl + enter). When I place the text from my database in a webpage the line breaks are gone. Is there a way to convert all the line breaks in my DB to <br>-tags when requesting the information from my db?

Thanks,
Steven
 
Yes, you can use the replace function to replace all the occurrences of vbCrLf with &lt;br&gt;:
Code:
htmlString = Replace(objRS(&quot;myFIeld&quot;),vbCRLF,&quot;<br>&quot;)

Hope that helps,
-Tarwn &quot;The problem with a kludge is eventually you're going to have to back and do it right.&quot; - Programmers Saying (The Wiz Biz - Rick Cook)
&quot;Your a geek!&quot; - My Girlfriends saying
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top