Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Update a field's data to CAPITAL LETTERS

Status
Not open for further replies.

spyder

Technical User
Jan 10, 2001
21
US
I have a table in which there is a field for employee names. I want the names to be in all caps, as opposed to how they were entered. Its too late for an input mask, as the names are already entered. I want an update query to re-format the field in all caps. I tried this:

Format(Str([name]),">")

But it didn't work.

Can anyone tell me what's wrong with my update query, and provide me with one that will work?
 
UPDATE Table1 SET Table1.name= UCase([Table1]![name]);

Try the SQL above. UCase is the function you are looking for.

Hope this helps.

Keith
 
I tried the KMITCH solution and it deleted everything in the field. Would you know the reson why?

UPDATE TblTotalData1 SET TblTotalData1.CKPCode = UCase([TblTotalData1]![CKPCode]);
This was the actual code I used.

TblTotalData1 is the name of the table and CKPCode is the name of the field I wanted to update.
 
I also tried the code and it deleted everything in the field???? Possibly, I did something wrong, I'm not familiar with SQL.
 
Sorry folks. Works for me. I even created
a table and field with the exact names as above
so that I could copy and paste Psalm6229's SQL
straight into the SQL view. Still worked. For
what it's worth, I defined CKPCode as a text field.
Also am using Access 97.

I'll keep thinking.

Here is the MS Access Help text for UCase:

Returns a Variant (String) containing the specified string, converted to uppercase.

Syntax

UCase(string)

The required string argument is any valid string expression. If string contains Null, Null is returned.

Remarks

Only lowercase letters are converted to uppercase; all uppercase letters and nonletter characters remain unchanged.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top