Open the Immediate Window (Ctrl+G), and enter:
? StrConv("fREd jOnEs", vbProperCase)
VBA returns:
Fred Jones
If you are trying to change the case of a field named "MyField":
1. Create a query into your table.
2. Change it to an Update query (Update on Query menu).
3. In the Update row under MyField, enter:
StrConv([MyField], 3)
4. Run the query.
It's a function. Where you would use it is any place where changing the case of
a string to proper case would be useful. You could use it in a SELECT query to
display a field in proper case without altering the base data.
SELECT strConv([SomeField],3) AS SomeAlias FROM SomeTable
You could use it in an UPDATE query to change the data that is stored in a table
to proper case.
UPDATE SomeTable SET [SomeField] = strConv([SomeTable]![SomeField],3)
You could use it in the ControlSource of a TextBox on a form or report to
display a field value in proper case.
=strConv([SomeField],3)
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.