In that case, you won't be able to use Split() directly. Instead, you could try using a custom function like this one to make it work. For example:I want to do this in the query
First3Words: GetMember([FieldName],1) & " " & GetMember([FieldName],2) & " " & GetMember([FieldName],3)
Oh, without using VBA, it would be a little trickier - but not impossible. Hang on...I want to do this in the query without VBA coding
Expr1: Left([f1],InStr([f1]," "))
Expr2: Left(Mid([f1],InStr([f1]," ")+1),InStr(Mid([f1],InStr([f1]," ")+1)," "))
Expr3: Left(Mid([f1],Len([expr1] & [expr2])+1),InStr(Mid([f1],Len([expr1] & [expr2])+1)," ")-1)
Thanks Gasman but I want to do this in the query
Function MySplit(strString as String, iPosition as Integer)
Dim strArray() as string
strArray = Split(strString)
MySplit = strArray(iPosition)
End Function
SplitOff: Left([splitme],InStr(InStr(1,[splitme]," ")+1,[splitme]," "))
Hi. You're welcome. We were all happy to assist. But please, keep in mind the other concerns we brought up earlier just in case you run into any issues in the future. Good luck with your project.Thanks a lot everyone I use thebdguy's option and it works great