Re: Need string for capitalization

From: Alex Ivanov (consul_at_collegeclub.com)
Date: 02/18/04


Date: Tue, 17 Feb 2004 22:32:11 -0800

Mid(YourString,1,1)=Ucase(Left(YourString,1)

Alex.

"fredg" <fgutkind@att.net> wrote in message
news:1dehn99sqvs61$.1rl2pi1iouf5i.dlg@40tude.net...
> On Tue, 17 Feb 2004 19:14:29 -0500, Kathy MacAthur wrote:
>
> > Hope someone can help.
> >
> > I'm trying to capitalize the first letter of a field but the string I am
> > using capitalizes the first letter, but changes the second and third
> > characters and UN capitalizes them. (Example, Oregon. If someone
correctly
> > enters OR for state name it is changed to Or.) I need a string that
will
> > only capitalized the first letter and leave the remaining characters as
> > entered.
> >
> > The string I'm using is StrConv([fieldname],3)
> >
> > Any suggestions?
> >
> > Thanks,
> >
> > Kathy
>
> Kathy,
> That is the correct behavior of StrConv([FieldName],3)
>
> In a Form, on a Report, in a Query?
>
> Code theAfterUpdate event of the control on the form:
> [ControlName] = UCase(Left([ControlName],1)) & Mid([ControlName],2)
>
> In a report control Source:
> = UCase(Left([ControlName],1)) & Mid([ControlName],2)
>
> In a Query:
> Exp: UCase(Left([ControlName],1)) & Mid([ControlName],2)
>
> Only the first character in the field will be Upper Case.
> --
> Fred
> Please only reply to this newsgroup.
> I do not reply to personal email.



Relevant Pages

  • Re: Advanced HTML DOM Issue
    ... I'm sorry, I wasn't explicit enough, I meant to say capitalize the ... the first letter of words and un-cap the rest, ... whole string causes the field to forget where the cursor is ... ...
    (alt.html)
  • Re: Surprise in StrConv using vbProperCase
    ... Your code will capitalize the first letter of a string. ... so the specs for StrConv using vbProperCase match ...
    (microsoft.public.access.modulesdaovba)
  • Re: Capitalize first letter in sentence
    ... PROPER will capitalize the first letter of each word, ... capitalizes just the first word of the string. ... This leaves the rest of the string unchanged and capitalises the first ...
    (microsoft.public.excel.worksheet.functions)
  • Re: Capitalize first letter of sentence
    ... Doesn't seem to do anything with ordinals either ... >> the first letter of the sentence is not capitalize. ... > From my typing class I learnt about the shift ...
    (microsoft.public.office.misc)
  • Re: Autocorrect initial capital and date autotext
    ... See “Word does not capitalize the first letter ... the exception (which some users don't ... text, not just autonumbered lists. ...
    (microsoft.public.word.formatting.longdocs)