If the text you want to split is in a string variable strText, you can
do something like this:
Dim arWords As Variant
arWords = Split(strText, " ")
arWords now contains an array with one element for each word in the
string. The number of elements (and therefore of words) is
UBound(arWords) + 1
arWords(0) is the first word,
arWords(1) the second word, and so on.
arWords(UBound(arWords)) is the last word
arWords(UBount(arWords) - 1) the second-last word, and so on.
If you want to extract individual words from a text field in a query,
you can use this little function:
Public Function SafeSplit(V As Variant, _
Delim As String, Item As Long) As Variant
On Error Resume Next 'to return Null if Item is out of range
SafeSplit = Split(V, Delim)(Item)
End Function
To use it, create a new module (standard module, not a class
module). Name it something like vbaFunctions. If
Option Explicit
doesn't appear at the top, type it in. Then paste in the SafeSplit()
function.
In your query, use calculated fields like this:
FirstWord: SafeSplit([MyField], " ", 0)
SecondWord: SafeSplit([MyField], " ", 1)
and so on.