String manipulation

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
 
K

Ken Snell

FirstWord = Left("Allseating Corporation Inc.", InStr("Allseating
Corporation Inc.", " ") - 1)

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

Patrick

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>




.
 
A

Albert D. Kallal

sorry, Ken, I did not mean to append this to your post....but Patrick's...
 

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

Top