Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get first and last word in a field 1

Status
Not open for further replies.

Aximboy

Technical User
Aug 3, 2003
63
US
Hello! As the title said, I need help on how to get the first and last word from a field.

For example, a field contains a contact name "Mr. John Lennon".
From a textbox, how to I make it show "Mr. Lennon" only?

Thanks in advance.
 
hi

Code:
dim a 

a = split([YourField], " ")

Txtbx.Text = a(0) & " " & a(ubound(a))


Skip,

[glasses]Just traded in my old subtlety...
for a NUANCE![tongue]
 
IT WORKED!!!
You are awesome! Thank you very much!!!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top