PC Review


Reply
Thread Tools Rate Thread

Changing sting case

 
 
Simon
Guest
Posts: n/a
 
      28th May 2004
Can anyone suggest a way of turning a string in full
capitals, for example a name like JOHN SMITH, into
sentence case, i.e. John Smith? I'm trying to extract
from a DB that stores everything in upper case to a
letter, but the closest I can get is john smith using
LCase which is not ideal. I thought about stepping
through the sting looking for a space and then UCase'ing
the next letter, but I can't seem to find the
functionality to break down a string character by
character.

All ideas welcome. Thanks in advance.

Simon
 
Reply With Quote
 
 
 
 
Nick Coe \(UK\)
Guest
Posts: n/a
 
      28th May 2004
From A2k on you could seperate the string into an array
variable using Split(string).

But save yourself some work, I'm sure there's some code to
do this (it's called Proper Case by the way) either at
www.mvps.org/access or at Stephan Lebans site www.lebans.com
or maybe at Allen Brownes www.allenbrowne.com but I can't
remember exactly...

--
Nick Coe (UK)
www.alphacos.co.uk
"Simon" <(E-Mail Removed)> wrote in
message news:1429a01c444a4$afece600$(E-Mail Removed)...
> Can anyone suggest a way of turning a string in full
> capitals, for example a name like JOHN SMITH, into
> sentence case, i.e. John Smith? I'm trying to extract
> from a DB that stores everything in upper case to a
> letter, but the closest I can get is john smith using
> LCase which is not ideal. I thought about stepping
> through the sting looking for a space and then UCase'ing
> the next letter, but I can't seem to find the
> functionality to break down a string character by
> character.
>
> All ideas welcome. Thanks in advance.
>
> Simon



 
Reply With Quote
 
Simon
Guest
Posts: n/a
 
      28th May 2004
You're a legend, absolutely spot on. First website on the
list had it. For anyone those that cares, use:

StrConv("JOHN SMITH", vbProperCase)

Many thanks,

Simon

>-----Original Message-----
>From A2k on you could seperate the string into an array
>variable using Split(string).
>
>But save yourself some work, I'm sure there's some code to
>do this (it's called Proper Case by the way) either at
>www.mvps.org/access or at Stephan Lebans site

www.lebans.com
>or maybe at Allen Brownes www.allenbrowne.com but I can't
>remember exactly...
>
>--
>Nick Coe (UK)
>www.alphacos.co.uk
>"Simon" <(E-Mail Removed)> wrote in
>message news:1429a01c444a4$afece600$(E-Mail Removed)...
>> Can anyone suggest a way of turning a string in full
>> capitals, for example a name like JOHN SMITH, into
>> sentence case, i.e. John Smith? I'm trying to extract
>> from a DB that stores everything in upper case to a
>> letter, but the closest I can get is john smith using
>> LCase which is not ideal. I thought about stepping
>> through the sting looking for a space and then UCase'ing
>> the next letter, but I can't seem to find the
>> functionality to break down a string character by
>> character.
>>
>> All ideas welcome. Thanks in advance.
>>
>> Simon

>
>
>.
>

 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Format portion of text sting in upper case Sammie Microsoft Access VBA Modules 1 18th Nov 2008 11:36 PM
Changing multiple cell text from lower case to upper case Patti Microsoft Excel Misc 2 4th Jan 2008 08:35 PM
Can't find short cut for changing case ... upper case .... lower case JERRY Microsoft Word New Users 7 23rd Aug 2007 05:29 PM
what is the function for changing text to proper case/title case? =?Utf-8?B?U2Fic191aw==?= Microsoft Access 1 16th Jun 2005 08:26 PM
Changing existing lower case text to upper case Tnd57 Microsoft Word Document Management 4 28th May 2004 12:38 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 03:23 AM.