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

Displaying database data on different lines 1

Status
Not open for further replies.

nicBee

Programmer
Jun 6, 2004
7
GB
Hi there

I am displaying a database table on a form, however even if the database field data is on several lines they are all displayed on one line on the page. Does anyone knoe why this is? This is my code

//connect to the database and get all data

While ((Repeat1__numRows <> 0) AND (NOT Recordset1.EOF)) %>

<tr><td height="22" colspan="2" valign="top" class="FormTextTitle"><%=(Recordset1.Fields.Item("Title").Value)%></td>
</tr>
<tr>
<td width="75" height="26"></td>
<td width="425" valign="top" class="FormText"><%=(Recordset1.Fields.Item("Info").Value)%></td>
</tr>
<tr>
<td height="14" colspan="2" valign="top"><!--DWLayoutEmptyCell-->&nbsp;</td>
</tr>
<tr>
<td height="20" colspan="2" valign="top"><img src="Assests/Graphics/DividerBlue.png" width="500" height="5"></td>
</tr>

<% Repeat1__index=Repeat1__index+1
Repeat1__numRows=Repeat1__numRows-1
Recordset1.MoveNext()
Wend %>

thanks
 
Have you tried something like this ?
<%=Replace(Recordset1("Info").Value, vbCrLf, "<BR>")%></td>
You may have to try vbNewLine, vbCr, vbLf, ... (in fact you have to discover the 'split line' character).

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top