P
Pupdawg
I need to capitalize the first and last name in a field, how do I do this?
I need to capitalize the first and last name in a field, how do I do this?
fredg said:I need to capitalize the first and last name in a field, how do I do this?
Do this where?
On a form?
On the Form's control's AfterUpdate event code:
Me![ControlName] = StrConv([ControlName],3)
In a query?
NewColumn:StrConv([FieldName],3)
Note: this will incorrectly capitalize some words which contain more
than one capital, i.e. O'Brien, MacDonald, IBM, Jones-Smith, ABC,
etc., and incorrectly capitalize some words that should not have any
capitals, or whose capitalization depends upon usage, such as e. e.
cummings, abc, van den Steen.
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.
You can create a table of exceptions and have the code use DLookUp
with a message if one of the exception words is found.
In the form. In the AfterUpdate event code, do I just plug this string in?
fredg said:I need to capitalize the first and last name in a field, how do I do this?
Do this where?
On a form?
On the Form's control's AfterUpdate event code:
Me![ControlName] = StrConv([ControlName],3)
In a query?
NewColumn:StrConv([FieldName],3)
Note: this will incorrectly capitalize some words which contain more
than one capital, i.e. O'Brien, MacDonald, IBM, Jones-Smith, ABC,
etc., and incorrectly capitalize some words that should not have any
capitals, or whose capitalization depends upon usage, such as e. e.
cummings, abc, van den Steen.
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.
You can create a table of exceptions and have the code use DLookUp
with a message if one of the exception words is found.
In the form. In the AfterUpdate event code, do I just plug this string in?
fredg said:I need to capitalize the first and last name in a field, how do I do this?
Do this where?
On a form?
On the Form's control's AfterUpdate event code:
Me![ControlName] = StrConv([ControlName],3)
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.