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!

Capitalize first letter of a word

Status
Not open for further replies.

Foxiemamma

Technical User
Dec 27, 2000
1
US
Hello,
I know that you can use <L>???? to capitalize the first letter of a word. I would like to know of a easier way, we have last names that are Smith-Jones or O'Malley and you cannot capitalize the second.
Thank you so much for any help on this matter--it is driving me crazy!!
 
Maybe the easiest thing to do is to write your own function to check whethet these characters occur in the name and convert the first character that follows to uppercase
 
Foxie:

Check the FAQs (this forum or general). I think there are a couple of neat functions described to do what you want.

If you are interested, I can send you the one I created -- checks for spaces, hyphens, apostrophes and Mac's.

Larry De Laruelle
larry1de@yahoo.com

 
Someone from here helped me with this before. I have this on exit of a combobox.

If (StrComp(Combo63, StrConv(Combo63, vbProperCase), 0)) Then
Combo63 = StrConv(Combo63, vbProperCase)
End If
It capitalizes the first letter of each word seperated by a space. Only problem is with hyphens or &quot;MacDonald&quot; it lower cases anything that isnt at the beginning of a word. Zorro
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top