Solved

Changing all caps to initial caps in Access

Posted on 2010-08-26
7
679 Views
Last Modified: 2012-05-10
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.
0
Comment
Question by:pstewartrrm
  • 2
  • 2
  • 2
  • +1
7 Comments
 
LVL 47

Expert Comment

by:Dale Fye (Access MVP)
ID: 33532815
Try the strConv function

Depending on what you want to do, this can be problematic.
0
 
LVL 77

Expert Comment

by:peter57r
ID: 33532822
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)
0
 

Author Comment

by:pstewartrrm
ID: 33535266
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?
0
Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

 
LVL 14

Accepted Solution

by:
ldunscombe earned 500 total points
ID: 33538546
In query design view select your table and drag the field you want to update to the grid.
Change the query type to an Update Query.  You will get an additional row in the grid for update to.
In the update to row of each field you want to update put
= strconv([NameOfTheField],3)
obviously change [NameOfTheField] to the actual name of the field.
Hope this helps.
Leigh
0
 
LVL 14

Expert Comment

by:ldunscombe
ID: 33538561
See attached image
CapsQuery.gif
0
 
LVL 77

Expert Comment

by:peter57r
ID: 33539797
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.

0
 

Author Closing Comment

by:pstewartrrm
ID: 33540882
Bingo!

Thanks.
0

Featured Post

Announcing the Most Valuable Experts of 2016

MVEs are more concerned with the satisfaction of those they help than with the considerable points they can earn. They are the types of people you feel privileged to call colleagues. Join us in honoring this amazing group of Experts.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Experts-Exchange is a great place to come for help with solutions for your database issues, and many problems are resolved within minutes of being posted.  Others take a little more time and effort and often providing a sample database is very helpf…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

821 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question