Proper capitilization of names

  • Thread starter Today's the Day
  • Start date
T

Today's the Day

I want to use an update query to capitalize the first
letter of each string and lower case the rest. The trick
is there is a blank between strings within the field such
as with proper names ie. John Doe Smith. I know I need to
use the functions mid, lcase, and ucase in my update
query, but am not quite getting it. Any help would be
appreciated.
 
F

Fredg

The function you want to use is StrConv()

Update YourTable Set YourTable.NameField = StrConv([NameField],3);

Note. This will give incorrect results with names such as McDonald, O'Brien,
van der Steen, Leigh-Taylor, etc.

The way to get these types of names case correct is to use an exceptions
table and run through each name before changing it. You would need a User
Defined function to do this.

Look up StrConv() in Access Help.
 

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