String manipulation

  • Thread starter Thread starter Patrick
  • Start date Start date
P

Patrick

HI ALL!!

I need a code example of how to get the first word in a
sentence:
Ex.: "Allseating Corporation Inc."
3 words..
Need to return: "Allseating"

How would I do that programmatically.

Thanks for any help,
PAtrick
 
FirstWord = Left("Allseating Corporation Inc.", InStr("Allseating
Corporation Inc.", " ") - 1)

You can use a variable in place of the text string.
 
Thanks a million, just what I needed!!
-----Original Message-----
FirstWord = Left("Allseating Corporation Inc.", InStr ("Allseating
Corporation Inc.", " ") - 1)

You can use a variable in place of the text string.

--
Ken Snell
<MS ACCESS MVP>




.
 
Back
Top