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>




.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top