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!

Split memo field data into several fields?

Status
Not open for further replies.

frontside

Technical User
Sep 26, 2002
85
SE
I have a number of addresses in a memo field like this.

John Doe
Downer avenue Apt 4
90210 Beverly Hills
USA

how do I split each row into its own field? I have tried the (Len(MemoField) - Len(Replace(MemoField, Chr(13) & Chr(10), ""))) / 2) to get a number of how many enter/breaks there is in the field but how do I use this info to withdraw each row into a seperate field?

Mikael
Sweden
 
You can use Split:

Code:
astrMemo = Split(strMemo, (Chr(13) + Chr(10)))
For i = 0 To UBound(astrMemo)
    Debug.Print astrMemo(i)
Next
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top