Table all in uppercase when imported into Access

S

sonnylja

I am importing a Dbase III table into MS Access, All of
the text fields are in uppercase (Approximately 17,000
records). My question is how can I convert all of the
text fields to lower case with only the first letter of
the field in Upper case such as name, address, city and
state fields?
 
C

Chris Mills

THERE'S NO EASY WAY
There's No EASY Way <g>

You can write a VBA routine or function using UCase or LCase (convert case),
and Left$, Mid$, Right$, Instr, or Split to pull the string apart, or
StrConv(string, vbProperCase) might be a good one.

The trouble with names and addresses, is that there's always exceptions.
Probably easiest to use StrConv and then scan the results for fix-ups.

Chris
 
A

Allen Browne

Create a query into this table.
Type something like this into the Field row of the grid:
StrConv([City], 3)

If that gives you the kind of results you want, change it to an update query
(Update on Query menu). Access adds an Update row to the grid. Move the
StrConv() expression into the Update row under the City field. Run the
query, and it updates all 17k records for you.

You can convert several fields at once.
The numbers to use with StrConv() are:
1 to convert to all upper case;
2 to convert to all lower case;
3 to convert to proper case (e.g. "This Is Proper Case")
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top