Link to home
Start Free TrialLog in
Avatar of pstewartrrm
pstewartrrm

asked on

Changing all caps to initial caps in Access

I have some Access tables that are in all caps and I would like to change them to inital caps only. Is there a query I can run which will accomplish this? I would perfer to create the query using design view than sql and I am a novice at sql. If it must be done is sql, I will need to know where to paste the code so I can run the query. Sorry for being ignorant.
Avatar of Dale Fye
Dale Fye
Flag of United States of America image

Try the strConv function

Depending on what you want to do, this can be problematic.
In a new query paste this into the sql view.
You need to modify it to use your own table and fieldname.

Update mytable set myfield= strconv(myfield, 3)
Avatar of pstewartrrm
pstewartrrm

ASKER

My table I want to update is called tbl_1979_test and the field is called lname. Is this what I paste into
the sql window? I tried it and it did not work.

SELECT tbl_1979_test
Update tbl_1979_test  set fname = strconv(fname, 3)

I actually would like to update all the fields in the table. Can this be done globally?
ASKER CERTIFIED SOLUTION
Avatar of ldunscombe
ldunscombe
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
See attached image
CapsQuery.gif
Leigh has now shown you what to do but I'll answer the previous Qs anyway..

"Is this what I paste into
the sql window? I tried it and it did not work.

SELECT tbl_1979_test
Update tbl_1979_test  set fname = strconv(fname, 3)"
There was no Select clause in what i posted before and none is required.; you just use the second line, as you will see if you look at the sql produced by Leigh's answer.


"I actually would like to update all the fields in the table. Can this be done globally?"
Not in a query.
If this is a once-off exercise, open the table and use the find and replace option from the menu.

Bingo!

Thanks.