String manipulation... help needed in making a string proper

A

Anja

Hi everyone,

I need some help with writing a function. I have a name (a string) say,
ANJA ENDE and what I want to do is just capitalize the first letter of
every individual word and every other character should be lower case.
(so the result would be Anja Ende).

What is the best and most efficient way to do this? I probably could do
this but it will be the most inefficient way with my relative
inexperience.

Thanks a lot.

Cheers,
Anja
 
K

Katrina

I use the StrConv() function, Look it up in help files.
dim mystring as string
mystring = "ANJA ENDE"
mystring = strconv(mystring, vbpropercase)

Now mystring Contains "Anja Ende"

HTH
Katrina
 
F

fredg

Hi everyone,

I need some help with writing a function. I have a name (a string) say,
ANJA ENDE and what I want to do is just capitalize the first letter of
every individual word and every other character should be lower case.
(so the result would be Anja Ende).

What is the best and most efficient way to do this? I probably could do
this but it will be the most inefficient way with my relative
inexperience.

Thanks a lot.

Cheers,
Anja

[FieldName] = StrConv([FieldName],3)

Unfortunately this will not properly capitalize names such as IBM
Corp., ABC Television, John van de Kamp, Luiz Castello-Perez, etc.
Do do these correctly, you will need a table of name capitalization
exceptions, and use a DLookUp to see if an exception exists.
 
Top