Uper case on each word

M

ModeMan

Greetings...

if i have these fields Number,Name,Address,Phone....

how to make the first letter in the "Name" field as Uper case? that goes for
the first and last name too.

for exemple if i want to type " joe kamble" it will appear " Joe Kamble"

I was stuck after putting >L<??? in the "Input Mask" .

PS: if possible i want that to work on any "field size"

Thanks for replying.

Z.S.
 
F

fredg

Greetings...

if i have these fields Number,Name,Address,Phone....

how to make the first letter in the "Name" field as Uper case? that goes for
the first and last name too.

for exemple if i want to type " joe kamble" it will appear " Joe Kamble"

I was stuck after putting >L<??? in the "Input Mask" .

PS: if possible i want that to work on any "field size"

Thanks for replying.

Z.S.

Don't use an Input mask.
Let the user enter the names however they will.
Code the Control's AfterUpdate event:
Me![ControlName] = StrConv([ControlName],3)

Be aware that this will improperly capitalize names that should have
more than one capital, i.e. McDonald, O'Brien, Smith-Barney, etc., and
also names that should not be capitalized, such as van der Meer, van
Beethoven, etc. as well as acronyms, such as IBM, NASA, etc.

You can get around this by creating a table of exceptions and using
code to determine if the entered name is one of those exceptions.

You would need to use an Update query to change already entered names.

Also, Name and Number are reserved Access/VBA/Jet words and should not
be used as a field names.
For additional reserved words, see the Microsoft KnowledgeBase article
for your version of Access:

109312 'Reserved Words in Microsoft Access' for Access 97
209187 'ACC2000: Reserved Words in Microsoft Access'
286335 'ACC2002: Reserved Words in Microsoft Access'
321266 'ACC2002: Microsoft Jet 4.0 Reserved Words'
 
R

Roger Carlson

This is a much harder problem than you imagine. What about the following
o'doyle or mcdonalds or mary jo kamble (where Mary Jo is the first name)

On my website in the OtherDevelopers Section is a Proper Case function which
handles the following:

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/Otherdownload.asp?SampleName='Proper Case Function'

--
--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
 
M

Mike Labosh

On my website in the OtherDevelopers Section is a Proper Case function
which
handles the following:

[snip-holio]

Oh great, now you tell me. I spent 5 or 6 weeks developing an algorithm
like that, along with 2 or 3 lookup tables in the database! :)

--
Peace & happy computing,

Mike Labosh, MCSD

"When you kill a man, you're a murderer.
Kill many, and you're a conqueror.
Kill them all and you're a god." -- Dave Mustane
 
Top