Proper Case

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a field that lists names as Doe,john
I need to have a space added after the comma and capitalize the "J".
End result

Doe, John
Help would be appreciated.
 
Hi,


StrConv( myString, 3 )


would do for the very simple cases. ( 3 = vbProperCase).



Hoping it may help,
Vanderghast, Access MVP
 
I have a field that lists names as Doe,john
I need to have a space added after the comma and capitalize the "J".
End result

Doe, John
Help would be appreciated.

This requires two operations, one for the space, one for the case. You
could update the field to

Left([namefield], InStr([namefield], ",") & " " &
StrConv(Mid([namefield], InStr([namefield], ",") + 1), 3)

You may want to consider instead using TWO fields, firstname and
surname; this is the usual method, since it allows displaying the name
as "John Doe" or "Doe, John" by concatenating separate fields rather
than the more difficult operation of taking a single field apart.

John W. Vinson[MVP]
 
Thank you for answer. I'm working on third party setting up 2 fields for name.

John Vinson said:
I have a field that lists names as Doe,john
I need to have a space added after the comma and capitalize the "J".
End result

Doe, John
Help would be appreciated.

This requires two operations, one for the space, one for the case. You
could update the field to

Left([namefield], InStr([namefield], ",") & " " &
StrConv(Mid([namefield], InStr([namefield], ",") + 1), 3)

You may want to consider instead using TWO fields, firstname and
surname; this is the usual method, since it allows displaying the name
as "John Doe" or "Doe, John" by concatenating separate fields rather
than the more difficult operation of taking a single field apart.

John W. Vinson[MVP]
 
Back
Top