Sentence Case

M

madarame

Hi there. I'm designing a database and I would like to add a feature in the
database where surnames entered in the table should be converted
automatically to Sentence case. I'm new to acccess and not very conversant
with functions.I've tried using strConv and vbProperCase functions but I cant
seem to get it to work.Could someone please outline the basic procedure for
creating this feature. I'm using Access 07.
Thanks.
 
F

fredg

Hi there. I'm designing a database and I would like to add a feature in the
database where surnames entered in the table should be converted
automatically to Sentence case. I'm new to acccess and not very conversant
with functions.I've tried using strConv and vbProperCase functions but I cant
seem to get it to work.Could someone please outline the basic procedure for
creating this feature. I'm using Access 07.
Thanks.

How would any of us know what 'doesn't work' if you don't tell us
exactly what the expression is?

=StrConv([FieldName],3)
Will Capitalize The First Letter Of Each Word In The Field.
It's called Proper Case.

Note that the above will incorrectly capitalize words which ought to
have more than one capital, such as O'Brien, McDonald, Trent-Jones,
etc. and also capitalize words which should not be capitalized, i.e.
van den Steen, van Beethoven, etc.

Is that what you mean by sentence case?

To me, sentence case would only capitalize the first word of a
sentence, leaving all of the other words alone.

=UCase(Left([FieldName],1) & Mid([FieldName],2)
will only capitalize the first word in a sentence.
 
J

Jeff Boyce

.... assuming only one sentence per [FieldName] record ... <g>

Regards

Jeff Boyce
Microsoft Office/Access MVP

fredg said:
Hi there. I'm designing a database and I would like to add a feature in
the
database where surnames entered in the table should be converted
automatically to Sentence case. I'm new to acccess and not very
conversant
with functions.I've tried using strConv and vbProperCase functions but I
cant
seem to get it to work.Could someone please outline the basic procedure
for
creating this feature. I'm using Access 07.
Thanks.

How would any of us know what 'doesn't work' if you don't tell us
exactly what the expression is?

=StrConv([FieldName],3)
Will Capitalize The First Letter Of Each Word In The Field.
It's called Proper Case.

Note that the above will incorrectly capitalize words which ought to
have more than one capital, such as O'Brien, McDonald, Trent-Jones,
etc. and also capitalize words which should not be capitalized, i.e.
van den Steen, van Beethoven, etc.

Is that what you mean by sentence case?

To me, sentence case would only capitalize the first word of a
sentence, leaving all of the other words alone.

=UCase(Left([FieldName],1) & Mid([FieldName],2)
will only capitalize the first word in a sentence.
 

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