Forums
This topic is locked
Multi line fields......?
Posted 02 Apr 2002 09:51:54
1
has voted
02 Apr 2002 09:51:54 Henrik Sandeberg posted:
I have multiline field and its updating a MS Access memo field, the question is, how to make carriage returns in the database automatic cause the user write the text like a word document with no carriage returns, when i read the db i will get a long row, with no carriage returns. I know that the user can insert br . I wonder if there are any other ways to do this.Edited by - smalbenet on 02 Apr 2002 09:52:22
Replies
Replied 02 Apr 2002 11:08:22
02 Apr 2002 11:08:22 Henrik Sandeberg replied:
Solved it with
<pre id=code><font face=courier size=2 id=code>
From this - <%=(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value)%>
To this - <%= Replace(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value,VbCrLf,"<BR>"%>
</font id=code></pre id=code>
But if the memofield is empty, i will get an error, is there any way to skip this?
<pre id=code><font face=courier size=2 id=code>
From this - <%=(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value)%>
To this - <%= Replace(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value,VbCrLf,"<BR>"%>
</font id=code></pre id=code>
But if the memofield is empty, i will get an error, is there any way to skip this?
Replied 02 Apr 2002 13:23:07
02 Apr 2002 13:23:07 Owen Eastwick replied:
Try:
<% If <%(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value) <> "" Then %>
<%= <%= Replace(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value,VbCrLf,"<BR>"%>
<% Else %>
& nbsp; (NOTE space added between & and n to display on the forum)
<% End If %>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Edited by - oeastwick on 02 Apr 2002 13:23:39
<% If <%(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value) <> "" Then %>
<%= <%= Replace(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value,VbCrLf,"<BR>"%>
<% Else %>
& nbsp; (NOTE space added between & and n to display on the forum)
<% End If %>
Regards
Owen.
Multiple Parameter UD4 / Access 2000 Database Search Tutorial:
www.tdsf.co.uk/tdsfdemo
Edited by - oeastwick on 02 Apr 2002 13:23:39
Replied 04 Apr 2002 12:51:40
04 Apr 2002 12:51:40 Henrik Sandeberg replied:
Ok, tnx, i have done a few changes to get it work,, but now its working just fine,,i will now continue with the upload side.....
/Henrik
/Henrik