Changing sting case

S

Simon

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
 
N

Nick Coe \(UK\)

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...
 
S

Simon

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
 

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