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

Split Memo Field into Many

Status
Not open for further replies.

mswilson16

Programmer
Nov 20, 2001
243
US
Hi All,

I have a memo field that is used to fill a asp page. In my memo field I have something like:

<p>This is a test</p>
<p>This is the second line of the test</p>
<p>This is the third line of the test</p>

I have a form were I want to be able to take the above and split upto the first </p> in to me.memText1 (so mem.text1 =<p>This is a test</p>), then after that split up to the next </p> in me.memtext2, etc etc.

If anyone could help that would be great! I am using Access 2003.

Thanks

Mswilson
 
You may try something like this:
Dim a As Variant, i As Integer
a = Split(Me![memo], "</p>", -1, 1)
For i = 1 To UBound(a)
Me("memtext" & i) = a(i - 1) & "</p>"
Next

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

Part and Inventory Search

Sponsor

Back
Top