changing UPPER CASE letters to lower case doable? (1 Viewer)

Espinoza84

Registered User.
Local time
Yesterday, 22:23
Joined
May 30, 2008
Messages
55
Suppose I have a table, that has 2x columns: FIRST_NAME and LAST_NAME

some of the data in these fields are all in UPPER case while in others are all in Lower Case.

Because, these are first and last names, I would like to change them to have the first letter to Upper case and the rest of the letters to lower case, I would like to do this for each of these 2x columns.

Is this doable? if so how is it accomplishable?

Thank you.
 

raskew

AWF VIP
Local time
Yesterday, 21:23
Joined
Jun 2, 2001
Messages
2,734
Hi -

In the help file, lookup the strConv() function and, more specifically, vbProperCase.

HTH - Bob
 

odin1701

Registered User.
Local time
Yesterday, 20:23
Joined
Dec 6, 2006
Messages
526
Put this in the field name for the query:

FName: UCase(Left((LCase([FIRST_NAME])),1)) & Right((LCase([FIRST_NAME])),(Len([FIRST_NAME])-1))

Repeat with the other field.
 

jfgambit

Kinetic Card Dealer
Local time
Today, 03:23
Joined
Jul 18, 2002
Messages
798
The String Conversion Function will accomplish this:

StrConv([FIRST_NAME],3)
StrConv([LAST_NAME],3)
 

odin1701

Registered User.
Local time
Yesterday, 20:23
Joined
Dec 6, 2006
Messages
526
Hi -

In the help file, lookup the strConv() function and, more specifically, vbProperCase.

HTH - Bob

I don't think you can use that in a query...not positive.

But that will work in VBA I know.

Ahh - jfgambit is right - have to use the number, not text.
 

raskew

AWF VIP
Local time
Yesterday, 21:23
Joined
Jun 2, 2001
Messages
2,734
I don't think you can use that in a query...not positive.

Sure can. Here's a working, tested, sample SQL that returns [AccountType] in vbUpperCase.

Code:
SELECT tblAccounts.AccountID, StrConv([AccountType],1) AS Expr1
FROM tblAccounts;

Bob
 
Last edited:

Users who are viewing this thread

Top Bottom