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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Output DB memo with line returns 1

Status
Not open for further replies.

ukwebsite

Programmer
Dec 9, 2000
82
GB
I have a form that inputs some data into a access database. The field that it inputs to is a memo field.

How do I output the info like it was inputted on the form e.g.

This is a sample
This is on the next line


But it comes out like this


This is a sample This is on the next line



When you open the database the data is on two lines but it only outputs on 1 line. Please help

Thanks Matthew Wilde
matthew@ukwebsite.com
 
When you output the info back to the screen use this:
Code:
strText = Replace(objRecordset(&quot;MemoField&quot;),vbcrlf,&quot;<BR>&quot;)

Response.Write strText

This replaces all the line breaks in the Memo field with valid HTML line breaks. Tony
reddot.gif WIDTH=400 HEIGHT=2 VSPACE=3

 
Works perfectly. Thanks very much. Matthew Wilde
matthew@ukwebsite.com
 

That worked good but what about tabs? Matthew Wilde
matthew@ukwebsite.com
 
Do the same thing, replace the character code for tab with something like
Code:
&quot;&nbsp;&nbsp;&nbsp;&nbsp;&quot;
. It's cheap, it's dirty, but it also works :)
-Tarwn ------------ My Little Dictionary ---------
Reverse Engineering - The expensive solution to not paying for proper documentation
 
whats the character code for tab? Is there a way to find out character codes Matthew Wilde
matthew@ukwebsite.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top