Public Function fnSplit(ByVal pString As String, ByVal pDelim As String, ByVal pItemNumber As Integer) As String
Dim v As Variant
If pItemNumber < 1 Then
Exit Function
End If
v = Split(pString, pDelim)
If UBound(v) + 1 >= pItemNumber Then
fnSplit = Trim$(v(pItemNumber - 1))
End If
End Function
what if there is no "space"Can do it right in the query
Then I guess the original post wouldn't be accurate, which states that there is a space.what if there is no "space"
for all we know, data can be:original post wouldn't be accurate
Or, you could just take the OP's word for it, since their original example included a space.for all we know
that is possible, don't you know?@#$%^@#$%@$#5/spaghetti ? It's possible, right?
Private Sub partan_AfterUpdate()
If InStr(Me.partan, "/") > 0 Then
Me.pa2 = Trim$(Left$(Me.partan, InStr(1, Me.partan, "/") - 1))
Me.pa3 = Trim$(Mid$(Me.partan, InStr(1, Me.partan, "/") + 1))
End If
End Sub
Uncle Gizmo: I find your comments absolutely unhelpful and rather insulting. I had the impulse of getting off the Forum forever. Is that what you want?
Uncle Gizmo: I find your comments absolutely unhelpful and rather insulting. I had the impulse of getting off the Forum forever. Is that what you want?