-----Original Message-----
I have set up a form to capture information about clients.
I would like to be able to have the Name fields (First,
Last) automatically capitalize the first character. Your
help is appreciated.
Code the AfterUpdate event of the control:
Me![ControlName] = StrConv(Me![ControlName],vbProperCase)
Be aware that this will not properly capitalize all words and names,
as some names must always be in all caps (IBM, CBS, etc.), some never
capitalized (e.e. cummings), some have 2 capitals in the name
(McDonald, O'Connor) and some have a mixed set of capitalized names
(van der Meer), as well as all hyphenated names.
The best way to accurately handle names like these, that I know of, is
to have a table of exceptions, and DLookUp the table for that
particular name or word before changing it.
You would need to create a User Defined function to do all of this and
regularly maintain the list of names, adding new names as needed.
And, after all is said and done, there are still some words and names
that can be written both ways (O'Connor, O'connor, McDonald, Mcdonald)
as well as others whose capitalization depends on usage (ABC, abc,
Xerox, xerox, Access, access).
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
.
Thanks , I will give this a try.