I was programming in Revelation (a string based, DB system) when I first ran across the concept of a delimited string.

I'll post one function from a suite, and if anyone is interested, I'll post more.

Public Function sf_Number_of_Elements(Master As String, Marker As String) As Integer
'This function will return the number of elements in Master using Marker as
' the delimiting character.
'
' -1 returned indicates a null Marker
' 0 returned indicates a null Master
' A positive integer indicates the number of elements present. Note that the
' any element (including the final) can be null.

Dim Return_String As Integer, i As Integer, j As Integer

Return_String = -1
If Marker = "" Then GoTo Xit_sf_Number_Of_Elements

Return_String = 0
If Master = "" Then GoTo Xit_sf_Number_Of_Elements

Return_String = 1
i = InStr(Master, Marker)
While i > 0
Return_String = Return_String + 1
i = InStr(i + 1, Master, Marker)
Wend

Xit_sf_Number_Of_Elements:
sf_Number_of_Elements = Return_String
End Function




Good Luck
DerFarm