capitalise the first letters of two or more words

H

hammie

I am trying to capitalise the first letter of two or more words automatically
e.g. Henry Fonda as opposed to just the "H" being capitalised. have searched
everywhere. I am fairly new at this but cannot find a suggestion that work
ks. evryone suggest >L<?????? but this only does the first letter of the
first name...anyone?..help???
 
F

fredg

I am trying to capitalise the first letter of two or more words automatically
e.g. Henry Fonda as opposed to just the "H" being capitalised. have searched
everywhere. I am fairly new at this but cannot find a suggestion that work
ks. evryone suggest >L<?????? but this only does the first letter of the
first name...anyone?..help???


NOTE: Entering the First Name and Last Name in one field is not the
proper way to store data in Access. You should have 2 fields, one for
the First Name and another for the Last Name.
If you also wish to store a Middle Initial or Middle Name, add a 3rd
field. It's very easy to combine the names (in a report or on a form)
but quite difficult to separate them when needed.

That being said, you are using a form for data entry? Right?

Enter the data however you wish, i.e. henRY fOndA

On the Form's control's AfterUpdate event code:
Me![ControlName] = StrConv([ControlName],3)

Henry Fonda will be stored.

Note: this will incorrectly capitalize some words which contain more
than one capital, i.e. O'Brien becomes O'brien, MacDonald becomes
Macdonald, Jones-Smith becomes Jones-smith, ABC becomes Abc, etc., and
incorrectly capitalize some words that should not have any capitals or
whose capitalization depends upon usage, such as e. e. cummings, van
den Steen, van Beethoven, etc., will all be incorrectly capitalized.
Then some names can be capitalized in more than one manner, depending
upon personal preference, i.e. O'Connor and O'connor, McDaniels and
Mcdaniels, etc., are both correct.
 
J

John W. Vinson

I am trying to capitalise the first letter of two or more words automatically
e.g. Henry Fonda as opposed to just the "H" being capitalised. have searched
everywhere. I am fairly new at this but cannot find a suggestion that work
ks. evryone suggest >L<?????? but this only does the first letter of the
first name...anyone?..help???

A Format won't work: it's a pretty limited feature.

You can use an Update Query to update the field in the table to

StrConv([fieldname], 3)

to use "proper case" - this will convert "henry fonda" to "Henry Fonda".
Unfortunately it will also convert "Ian McIntyre" to "Ian Mcintyre", and
"byron de la beckwith" to "Byron De La Beckwith" - capitalizing only the first
letter of each word.

You *should* be storing the firstname and the lastname in separate fields,
though.
 

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