Solved

Changing all caps to initial caps in Access

Posted on 2010-08-26
7
678 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
Three Reasons Why Backup is Strategic

Backup is strategic to your business because your data is strategic to your business. Without backup, your business will fail. This white paper explains why it is vital for you to design and immediately execute a backup strategy to protect 100 percent of your data.

 
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

Courses: Start Training Online With Pros, Today

Brush up on the basics or master the advanced techniques required to earn essential industry certifications, with Courses. Enroll in a course and start learning today. Training topics range from Android App Dev to the Xen Virtualization Platform.

Question has a verified solution.

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

In the previous article, Using a Critera Form to Filter Records (http://www.experts-exchange.com/A_6069.html), the form was basically a data container storing user input, which queries and other database objects could read. The form had to remain op…
Overview: This article:       (a) explains one principle method to cross-reference invoice items in Quickbooks®       (b) explores the reasons one might need to cross-reference invoice items       (c) provides a sample process for creating a M…
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.
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 …

776 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