Solved

Changing all caps to initial caps in Access

Posted on 2010-08-26
7
674 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
How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

 
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

Free Gift Card with Acronis Backup Purchase!

Backup any data in any location: local and remote systems, physical and virtual servers, private and public clouds, Macs and PCs, tablets and mobile devices, & more! For limited time only, buy any Acronis backup products and get a FREE Amazon/Best Buy gift card worth up to $200!

Join & Write a Comment

Suggested Solutions

Most if not all databases provide tools to filter data; even simple mail-merge programs might offer basic filtering capabilities. This is so important that, although Access has many built-in features to help the user in this task, developers often n…
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…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

758 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now