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

  • Thread starter Thread starter Anja
  • Start date Start date
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
 
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
 
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.
 

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