Ucase first character of string

G

Guest

I have imported a table of names, addresses, etc that are all upper case. I
have converted everything to lowercase but now need to change the first
letter of each string to uppercase. How???

steve
 
A

Allen Browne

Use StrConv() in an Update query.

1. Create a query using this table.

2. Change it to an Update query (Update on Query menu.)
Access adds an Update row to the grid.

3. In the Update row under the Surname field, enter:
StrConv([Surname], 3)

4. Do the same thing for the other fields that need converting.

5. Run the query.

You will have some manual cleaning up to do.

BTW, that converts the first letter of each word to upper case.
If you just wanted the first letter of the field, use:
Left([Surname],1) & StrConv(Mid([Surname], 2, 2)
 
G

Guest

Thanks Allen. That is exactly what I needed. I have 3 books on Access and
none of them have a reference to all the functions available. Where can I
find a good reference with examples. When I use the builtin help for access
and type in Strconv I get a very confusing explaination about ANSI vs unicode
characters.

Steve
Allen Browne said:
Use StrConv() in an Update query.

1. Create a query using this table.

2. Change it to an Update query (Update on Query menu.)
Access adds an Update row to the grid.

3. In the Update row under the Surname field, enter:
StrConv([Surname], 3)

4. Do the same thing for the other fields that need converting.

5. Run the query.

You will have some manual cleaning up to do.

BTW, that converts the first letter of each word to upper case.
If you just wanted the first letter of the field, use:
Left([Surname],1) & StrConv(Mid([Surname], 2, 2)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Steve S said:
I have imported a table of names, addresses, etc that are all upper case.
I
have converted everything to lowercase but now need to change the first
letter of each string to uppercase. How???

steve
 
P

Please Help Me

This should capitalize the first letter of the entire string and leave the
rest unchanged....
StrConv(Left([MyField],1),3) & Mid([MyField],2)

Steve S said:
Thanks Allen. That is exactly what I needed. I have 3 books on Access and
none of them have a reference to all the functions available. Where can I
find a good reference with examples. When I use the builtin help for access
and type in Strconv I get a very confusing explaination about ANSI vs unicode
characters.

Steve
Allen Browne said:
Use StrConv() in an Update query.

1. Create a query using this table.

2. Change it to an Update query (Update on Query menu.)
Access adds an Update row to the grid.

3. In the Update row under the Surname field, enter:
StrConv([Surname], 3)

4. Do the same thing for the other fields that need converting.

5. Run the query.

You will have some manual cleaning up to do.

BTW, that converts the first letter of each word to upper case.
If you just wanted the first letter of the field, use:
Left([Surname],1) & StrConv(Mid([Surname], 2, 2)

--
Allen Browne - Microsoft MVP. Perth, Western Australia

Reply to group, rather than allenbrowne at mvps dot org.

Steve S said:
I have imported a table of names, addresses, etc that are all upper case.
I
have converted everything to lowercase but now need to change the first
letter of each string to uppercase. How???

steve
 

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