Simple update query question

K

K M

I have a table containing city names. They are all in uppercase. I'm trying
to use an update query to change them all to proper case (first letter upper,
the rest lower). What do I put in the update to: field of the query to
achieve this?

TIA

KM
 
J

John Spencer

Try

StrConv([City Name],3)

That will handle names like San Francisco and Las Vegas as well as
London, Rio De Janeiro, etc.

It will not be perfect since each separate word will be capitalized, so
Rio de Janeiro will end up as Rio De Janeiro. But that is close and
you could always manually fix the problem.



'====================================================
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
'====================================================
 
F

fredg

I have a table containing city names. They are all in uppercase. I'm trying
to use an update query to change them all to proper case (first letter upper,
the rest lower). What do I put in the update to: field of the query to
achieve this?

TIA

KM

StrConv([City],3)

Unfortunately this will incorrectly capitalize some city names. The
two that come to mind just now are Coeur d'Alene, Idaho will become
Coeur D'alene and King of Prussia, Pennsylvania will become King Of
Prussia. There are others.
 
K

K M

Thanks for the quick reply. I anticipated the names with two words, but the
bulk of the records will be my city which is only one word, the rest I can do
manually without too much pain.
Again, thanks for the help.

KM

fredg said:
I have a table containing city names. They are all in uppercase. I'm trying
to use an update query to change them all to proper case (first letter upper,
the rest lower). What do I put in the update to: field of the query to
achieve this?

TIA

KM

StrConv([City],3)

Unfortunately this will incorrectly capitalize some city names. The
two that come to mind just now are Coeur d'Alene, Idaho will become
Coeur D'alene and King of Prussia, Pennsylvania will become King Of
Prussia. There are others.
 

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