L
Lez
I Guys have a function that allows me to find the part of a feild and create
a new field from this value, However, can anyone tell me how I get it to just
find the first value "Sizes :" and ingnore the next part "Colours :" I need
to create a seperate field for colours. This is the call and the function is
below.
Sizes: fGetToken([style],"Sizes :",2)
Public Function fGetToken(strIn, _
Optional strDelimiter As String = " ", _
Optional LPos As Long = 1)
'Return the Nth item from a delimited list of items.
Dim strArr As Variant
If Len(strIn & "") = 0 Then
fGetToken = strIn
Else
strArr = Split(strIn, strDelimiter)
If LPos - 1 <= UBound(strArr) Then
fGetToken = strArr(LPos - 1)
Else
fGetToken = Null
End If
End If
End Function
a new field from this value, However, can anyone tell me how I get it to just
find the first value "Sizes :" and ingnore the next part "Colours :" I need
to create a seperate field for colours. This is the call and the function is
below.
Sizes: fGetToken([style],"Sizes :",2)
Public Function fGetToken(strIn, _
Optional strDelimiter As String = " ", _
Optional LPos As Long = 1)
'Return the Nth item from a delimited list of items.
Dim strArr As Variant
If Len(strIn & "") = 0 Then
fGetToken = strIn
Else
strArr = Split(strIn, strDelimiter)
If LPos - 1 <= UBound(strArr) Then
fGetToken = strArr(LPos - 1)
Else
fGetToken = Null
End If
End If
End Function