Question about changing case in database (1 Viewer)

A

Alpha1

Guest
I am sure this is probably a stupid question, but I don't work with Access too often.

I am a huge database in Access where all the information is in caps, I need to convert it to sentence case, but can't seem to figure out how.

If someone could tell me how to do this I would REALLY appreciate it.

Thanks!
 

Shep

Shep
Local time
Today, 06:49
Joined
Dec 5, 2000
Messages
364
There are several ways to do this.

One is by using an Update Query.

Add each field you'd like to update in query design.

In the "Update To:" row for each field:
StrConv([FieldName], 3)

Where:
[FieldName] = The name of the field you wish to update.

(3 = vbProperCase)

I'd certainly test this on a copy of the database first, to be sure it's doing exactly what you want it to do.

If it's extraordinarily large, I'd copy just one table or a portion of a table and paste it into a new test table and test your update on this test data.

You may also accomplish what you want with RecordSets. If you are not fluent enough, an Update Query would be best, I suppose.

Some caveats:
vbProperCase changes every word to proper casing (first letter uppercase, the rest lowercase). This may not be exactly what you want. Also, the strConv Function is for text fields. I don't know how it will affect other data types, without testing.

Shep

Edit:
I tested this with Text, Number (Long Integer), Date, Memo, Currency and Autonumber fields.

The function handles Text and Memo fields as you might expect.

It seems to (thankfully) ignore all of the rest with the exception of an Autonumber field, which it of course balks on. Autonumber fields are not updateable.
 
Last edited:
A

AndiJB

Guest
Big, huge hugs to you Shep!

I have been using Access on the surface for several years. I have just gained employment which is requiring me to get in deep and dirty. My boss and I struggled with this one for weeks. We knew the answer was something simple. I just never thought it would be THIS simple!!

You are a life saver!
 

Users who are viewing this thread

Top Bottom