I need to code vbProperCase

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

Guest

I would like the firest letter of all my fields to be uppercase. I can't
seem to get it to work. Can you help Please with code? Thanks, Edward Keith
 
Use the AfterUpdate event procedure of the field to change it's value.

Example:
Private Sub Text0_AfterUpdate()
Me.Text0 = StrConv(Me.Text0, vbProperCase)
End Sub

In general, this doesn't work very well. It upsets the McDonalds, O'Briens,
van Leens, etc.
 
in addition to Allen's information and code, note that vbProperCase will
capitalize the first letter of each separate *word* in a field. capitalizing
only the first letter in a *field* might be closer to "Sentence" case, which
is available in MS Word but not in Access.

hth


edward keith said:
I would like the firest letter of all my fields to be uppercase. I can't
seem to get it to work. Can you help Please with code? Thanks, Edward
Keith
 
tina said:
in addition to Allen's information and code, note that vbProperCase will
capitalize the first letter of each separate *word* in a field.
capitalizing
only the first letter in a *field* might be closer to "Sentence" case,
which
is available in MS Word but not in Access.

.... but it's still easy enough to do. Simply uppercase the first letter and
lowercase the rest:

UCase(Left([MyField], 1)) & LCase(Mid([MyField], 2))
 

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

Back
Top