The addition of split in VB6 makes parsing much easier. Before split came along one had to rely on INSTR and a good LOOP and REDIM.
Split has that nasty problem of multiple elements for your data section.
[tt]
for n = 4 to ubound(splitArray)
data = data & " " & splitArray

next n
[/tt]
Finding the nth space is easy too... (quik, durtie, and untested...
[tt]
function iSpace(n,SearchString)
dim i as integer
i = 0 ' Is a good place to start
if (0 < n) then
do while 0 < n
i = instr(i+1, SearchString, SPACE)
n = n-1
loop
end if
iSpace = i
End Function
[/tt]
iSpace is 0 if it does not find the nth space, otherwise it is the position of the nth space.. For you
[tt]
data = mid$(YourRecord, iSpace(3, YourRecord)+1)
[/tt]
There is still another boogyman for this method. Multiple delimiters in the data being treated as one. Your input sample deosn't show this, but the output does.
To handle that situation you need to create a process to strip the field from the left and also return the remaining portion. You'll then be able to TRIM the remainder to eliminate the duplicate delimiters. It runs kind of like this:
[tt]
Function Parse(sIn) as String
dim i
i = instr(1, sIn, " "

if i then ' Have more
Parse = Left(sIn, i-1) ' return token
sIn = TRIM(mid(sIn, i)) ' and remainder of string
else
Parse = sIn
sIn = ""
endif
end function
[/tt]
Another monkey wrench... What happens when you want to parse on tab, space, and comma? Split's coisin, REPLACE is handy here. REPLACE comma and tabs with space and proceed as above.
Finally allow for your delimiters to be escaped (treated as data) or quoted and as such also treated as data?
I'll leave that to another.
Wil Mead
wmead@optonline.net