>
>
> "Douglas J. Steele" wrote:
>
> > Sorry, you're right. StrConv with the vbProperCase doesn't do what you're
> > looking for.
> >
> > You'd have to write a function that used LCase to convert the whole thing to
> > lower case, then selectively use UCase to convert the first character to
> > upper case, as well as the first character after each period.
> >
> > Something like the following untested air-code:
> >
> > Function ProperCase(InputString As String) As String
> > Dim lngLoop As Long
> > Dim lngStringLength As String
> > Dim lngPeriod As Long
> > Dim strOutput As String
> >
> > lngStringLength = Len(InputString)
> >
> > strOutput = UCase(Left(InputString, 1)) & _
> > LCase(Mid(InputString, 2))
> >
> > lngPeriod = InStr(strOutput, ".") + 1
> > Do While lngPeriod < lngStringLength
> > If Mid(strOutput, lngPeriod, 1) <> " " Then
> > Mid(strOutput, lngPeriod, 1) = UCase(Mid(strOutput, lngPeriod, 1))
> > lngPeriod = InStr(lngPeriod, strOutput, ".")
> > End If
> > lngPeriod = lngPeriod + 1
> > Loop
> >
> > ProperCase = strOutput
> >
> > End Function
> >
> > It does have a problem in that it doesn't recognize exclamation points as
> > sentence ends.
> >
> > --
> > Doug Steele, Microsoft Access MVP
> >
http://I.Am/DougSteele> > (no e-mails, please!)
> >
> >
> > "Shadow" <Shadow[ at ]discussions.microsoft.com> wrote in message
> > news:D0421319-608E-401B-B6C9-AA6457418C50[ at ]microsoft.com...
> > >
> > >
> > > "Douglas J. Steele" wrote:
> > >
> > >> Check the StrConv function.
> > >>
> > >> --
> > >> Doug Steele, Microsoft Access MVP
> > >>
http://I.Am/DougSteele> > >> (no private e-mails, please)
> > >>
> > >>
> > >> "Shadow" <Shadow[ at ]discussions.microsoft.com> wrote in message
> > >> news:698107D8-6475-451F-9AEF-584FF1A0001F[ at ]microsoft.com...
> > >> >I have a database with a memo field that has many entries entered as
> > >> >allcaps.
> > >> > Is there a function similar to Pcase or vb language that would permit
> > >> > modifying the allcaps data in the memo field to a modified 'Proper'
> > >> > capitalization with only the first letter of a sentence or bullet
> > >> > capitalized? The memo field can contain several sentences or several
> > >> > numbered bullets.
> > >>
> > >>
> > >>
> > > I know about the StrConv function but do not know how to apply it to all
> > > the
> > > words in a sentence (i.e. first word capitalized and all subsequent words
> > > lower case). And then to stop it at the first period and restart it for
> > > the
> > > second sentence.
> >
> >
> >
> Thanks Douglas for your help. This saved a lot of retyping and can be used
> to correct ALLCAPS data entry. There are a few problems like you mentioned
> as explanation points but the conversion is infinitely better than 'StrConv'
> and is acceptable for out application.
> I modified 'Dim lngStringLength As String' to 'Dim lngStringLength As Long'.
> The code works as long as there is a period at the end of the string of memo
> comments.
> Shadow