×
INTELLIGENT WORK FORUMS
FOR COMPUTER PROFESSIONALS

Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here

Jobs

Proper case formatting?

Proper case formatting?

Proper case formatting?

(OP)
I am familiar with proper case formatting of text in Excel - however, in Access - it seems to be possible to either have all upper or lower case. Any suggestions?

RE: Proper case formatting?

You can check help for upper and lower case functions. In addition, if you only want the output to appear in upper case, put the > symbol in the format, in desing veiw, of the field.

An investment in knowledge always pays the best dividends.

by Benjamin Franklin

RE: Proper case formatting?

You can use the StrConv function to help control the case.  

StrConv([YourField],vbProperCase)

This will convert your string to Title case.  There are a few others.  Here's a list from the help file in Access:

vbUpperCase 1 Converts the string to uppercase characters.
vbLowerCase 2 Converts the string to lowercase characters.
vbProperCase 3 Converts the first letter of every word in string to uppercase.
vbWide* 4* Converts narrow (single-byte) characters in string to wide (double-byte) characters.
vbNarrow* 8* Converts wide (double-byte) characters in string to narrow (single-byte) characters.
vbKatakana** 16** Converts Hiragana characters in string to Katakana characters.
vbHiragana** 32** Converts Katakana characters in string to Hiragana characters.
vbUnicode 64 Converts the string to Unicode using the default code page of the system. (Not available on the Macintosh.)
vbFromUnicode 128 Converts the string from Unicode to the default code page of the system. (Not available on the Macintosh.)

Should work for you.  Let me know if not.

Patrick

RE: Proper case formatting?

(OP)
Looks great - thank you - however, where should I use this?

RE: Proper case formatting?

You can use StrConv either in a formula for the control source of a text box

ControlSource: =StrConv([YourField],vbProperCase)

Or in the field of a query

YourField1: StrConv([YourField],vbProperCase)

I generally do formatting stuff like this at the form or report level, so as not to alter the data.  If you change the format at the query level, you can run into some criteria problems later.

Good luck!

-Patrick

Nine times out of ten, the simplest solution is the best one.

RE: Proper case formatting?

Patrick‚Äôs is right, however I had problems using it in a query as he suggested.  I found this to work in that scenario - YourField1: StrConv([YourField],3).

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close