Select FIRST word

Pete666

Registered User.
Local time
Today, 22:38
Joined
Aug 29, 2006
Messages
28
I'm trying to create a query that gives me the first word in a field but am having some difficulties.

I'm using Access 97 (Dated I know) but also have Access 2003 if I need to revert as a lot of code does not work on 97.

Any help appreciated.

Pete
 
Have a look in the Help Files on the useage of the SPLIT() function.

Dim myArray() as String, firstWord as String

myArray = Split("this is my string", " ")

firstWord = myArray(0)
 

Users who are viewing this thread

Back
Top Bottom