normalizing uppercases..

keybearer

Registered User.
Local time
Today, 03:01
Joined
Jul 7, 2003
Messages
41
hi.. i need some help here.. i have a contact database where all the data is in uppercase.. how do i change/normalize the case when i want the data to be displayed in a report? it's quite hard to read a report in uppercase and doesn't look nice....
 
Also--
If you search this forum you would have found this one to handle the Mc's and Mac's:

http://www.access-programmers.co.uk/forums/showthread.php?s=&threadid=46405



You can also do a quick & dirty convert if you don't have spaces or multiple words in the database field (i.e. "JOE SMITH" or "TITLE OF MY BOOK")

set Record Source
=Left([myField],1)&LCase(Right([myField],Len([myField])-1))
 
Last edited:
hmm.. i got it working.. thanks.. but there's just one problem.. the string im trying to convert is a street address.. is it possible to normalize the string only when a word is more than 4 characters long? and is it possible to not normalize a letter directly after numbers, i.e 23A?
i've just taken a look at the thread u gave n the code.. i hevent tested it but will it work on the street address?
thanks again..
 
Last edited:
You will have to do some coding modifications.

You need to look at every token in the string, if it starts with numbers, leave it alone. If it is letters, propcase it. That would be the easiest and add some rules about apartments.

I'm not sure why you have 4 letter rule. "12 South MAIN Street" may not look so good.

Other option is to do some searches for modules with regex (regular expressions). There are a few developer sites which may sell these or provide as shareware. And then just call the external module from VBA.

-stormin
 
hmm.. youre right.. it'll look weird.. anyways, about searching the token, how do i do that? i know i'm asking a lot here.. bt im at a total loss here..
 

Users who are viewing this thread

Back
Top Bottom