Case issues

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

We have a database where data is imported from a registration vendor. We
have names that come in all "case" imaginable. We may have all caps, all
lower, a combo, etc. Is there a function in Access that will take a name,
and create consistent "case"? For example,

Imported Data: CARLOS COSCIA
Desired Result: Carlos Coscia

Thank you for your help.

Susie
 
We have a database where data is imported from a registration vendor. We
have names that come in all "case" imaginable. We may have all caps, all
lower, a combo, etc. Is there a function in Access that will take a name,
and create consistent "case"? For example,

Imported Data: CARLOS COSCIA
Desired Result: Carlos Coscia

Thank you for your help.

Susie

Yes: StrConv(). See its online help with the VBA editor open.

For Proper Case, use an Update query updating the field to

StrConv([fieldname], 3)

Note that this will update a properly-formatted name like "Ian
MacDonald" or "Luis de la Torre" to "Ian Macdonald" and "Luis De La
Torre" respectively, but that sounds better than what you've got.

John W. Vinson[MVP]
 
Hi Susie

The "built-in" way to do this is by using the StrConv function:

StrConv("CARLOS COSCIA", vbProperCase)
gives
Carlos Coscia

However, with names there are always exceptions that give rise to
difficulty. For example:

Ronald Mcdonald should be "McDonald"
Richard O'brien should be "O'Brien"
Walter De La Mare should be "de la Mare"

Some of these exceptions can be fixed automatically with lookup tables and
complex code, but others just cannot. For example, some people like to
spell "MacDonald", while others prefer "Macdonald". And then there are the
bizarre preferences like "e e cummings".

How far you go depends on how much time you want to put into the solution.

BTW, if you are using StrConv in a query, it will not understand the
built-in constant vbProperCase, so use the value 3 instead.
 

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

Similar Threads

Wifi Network Issue 0
converting uppercase to proper case 4
Caps Lock 2
Access It's time for your check-in. 1
FreeNAS hardware 6
Coverting Upper Case to Lower Case 1
comparing data 1
Database Import Duplicate Issue 0

Back
Top