McThis and McThat and McWhat

G

Guest

I have coded name and address fields in a database to capitalise the first
letter of each word. This works superbly.

However, I have the problem of what to do with Scottish/Irish names
beginning with McName. Is there any way that I can add to my existing code
using the Mc criteria as an exemption to the general "capitalise all first
letters" rule?

Thanking all you genius's out there in anticipation

Perry Kerr
 
G

Guest

I should have put my code in:-

Sub Customer_Last_Name_AfterUpdate()
Customer_Last_Name = StrConv(Customer_Last_Name, vbProperCase)
End Sub
 
R

Roger Carlson

David McAfee has written a pretty comprehensive ProperCase function. It
will do the following:

TestName
PCtestName

DAVID MCAFEE
David McAfee

david mcafee
David McAfee

eee movers
EEE Movers

joe bob smith
Joe Bob Smith

mary jo brady
Mary Jo Brady

a.b.c. industries
A.B.C. Industries

b&b mfg
B&B Mfg

sharon o'conner
Sharon O'Conner

don't
Don't

tom's diner
Tom's Diner

Adamczyk
Adamczyk

tomcheck
Tomcheck

oscar de la hoya
Oscar de La Hoya

a b c Manufacturing
A B C Manufacturing

florina dimartini
Florina diMartini



You can find it here:
http://www.rogersaccesslibrary.com/OtherLibraries.asp#McAfee,David

--
--Roger Carlson
Access Database Samples: www.rogersaccesslibrary.com
Want answers to your Access questions in your Email?
Free subscription:
http://peach.ease.lsoft.com/scripts/wa.exe?SUBED1=ACCESS-L
 
F

fredg

I have coded name and address fields in a database to capitalise the first
letter of each word. This works superbly.

However, I have the problem of what to do with Scottish/Irish names
beginning with McName. Is there any way that I can add to my existing code
using the Mc criteria as an exemption to the general "capitalise all first
letters" rule?

Thanking all you genius's out there in anticipation

Perry Kerr

You should create your own table with the names of capitalization
exceptions. Then use a DLookUp to see if that exception exists and ask
if the capitalization is to be changed or not. It occurs in more than
just Scotch/Irish names, i.e. van den Steen, van Beethoven, etc.
Be aware that some names can be capitalized in more than one fashion.
McDonald and Macdonald, are both correct. It's an individual choice.
 

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