Get ready for BLACK FRIDAY shopping starting in

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 - &lt;%=(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value)%&gt;

To this - &lt;%= Replace(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value,VbCrLf,"&lt;BR&gt;"%&gt;

</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:

&lt;% If &lt;%(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value) &lt;&gt; "" Then %&gt;
&lt;%= &lt;%= Replace(YourRecrdsetName.Fields.Item("YourMemoFieldName".Value,VbCrLf,"&lt;BR&gt;"%&gt;
&lt;% Else %&gt;
& nbsp; (NOTE space added between & and n to display on the forum)
&lt;% End If %&gt;

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

Reply to this topic