A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Simple update query question



 
 
Thread Tools Display Modes
  #1  
Old July 4th, 2008, 03:11 PM posted to microsoft.public.access.queries
K M
external usenet poster
 
Posts: 2
Default Simple update query question

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
  #2  
Old July 4th, 2008, 03:30 PM posted to microsoft.public.access.queries
John Spencer
external usenet poster
 
Posts: 2,364
Default Simple update query question

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
'================================================= ===


K M wrote:
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

  #3  
Old July 4th, 2008, 03:30 PM posted to microsoft.public.access.queries
fredg
external usenet poster
 
Posts: 4,386
Default Simple update query question

On Fri, 4 Jul 2008 07:11:01 -0700, K M wrote:

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.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail
  #4  
Old July 4th, 2008, 04:25 PM posted to microsoft.public.access.queries
K M
external usenet poster
 
Posts: 2
Default Simple update query question

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" wrote:

On Fri, 4 Jul 2008 07:11:01 -0700, K M wrote:

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.
--
Fred
Please respond only to this newsgroup.
I do not reply to personal e-mail

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 10:38 AM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.