Results 1 to 5 of 5
  1. #1
    Forums10 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    3

    Upper & Lower Case in table

    I would like to have a field in our table programmatically create the first letter of a word as Upper Case and the balance of each word in lower case.

    ie: Skiing Is Fun

    not: SKIING IS FUN or skiing is fun



    Thanks

  2. #2
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    the ProperCase method will cap first letter, but not sure for a phrase - you will want to look that up.

    decide whether to implement this as data is entered - or post entry in an update query applied to all records

    if ProperCase caps every word, rather than just the first word then:

    * look up and get to know Instr In String to search for the first " "

    * Left() method to get word to left of first " "

    and then proper case.

    Hope this helps.

  3. #3
    Forums10 is offline Novice
    Windows XP Access 2003
    Join Date
    Jan 2011
    Posts
    3

    Upper & Lower Case

    Thank you for your idea, but it does not work for what I would like to do below.

    I would like to have a field in our table programmatically create the first letter of a word in a phrase as Upper Case (Capital) and the other part of each word in lower case as the user types the data

    ie: Skiing Is Fun In Alberta

    not: SKIING IS FUN IN ALBERTA or skiing is fun in alberta

    Thanks

  4. #4
    ajetrumpet is offline VIP
    Windows Vista Access 2007
    Join Date
    Mar 2010
    Location
    N/A
    Posts
    2,694
    Quote Originally Posted by Forums10 View Post
    I would like to have a field in our table programmatically create the first letter of a word in a phrase as Upper Case (Capital) and the other part of each word in lower case as the user types the data
    this is impractical, even after saying it twice.

    for all practical purposes, assume that it can't be done AS the user is typing. you're better off to change inputs when the record is entered, that way code has time to run. and it should only take one line of code, because the help menu says:
    vbProperCase 3 Converts the first letter of every word in string to uppercase.

  5. #5
    NTC is offline VIP
    Windows Vista Access 2007
    Join Date
    Nov 2009
    Posts
    2,392
    The outline I provide will definitely work. It applies ProperCase to the first word. (not the entire phrase) The key is to find just the first word. You do that by finding the first space. Have done it, it works.

    In essence you first break apart the phrase, propercase the first word, and then rejoin the phrase.

    It is brute force however and so feasibly there is a more elegant method but it isn't at the tip of my typing fingers.

    hope this helps.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Is there a way to force a field do be upper case?
    By newtoAccess in forum Access
    Replies: 1
    Last Post: 11-28-2010, 04:20 PM
  2. Forcing text to upper case
    By barrettp in forum Forms
    Replies: 10
    Last Post: 06-01-2010, 09:44 AM
  3. upper left button
    By julienb in forum Forms
    Replies: 0
    Last Post: 03-02-2010, 07:55 AM
  4. Converting all text input to lower case
    By aommaster in forum Forms
    Replies: 6
    Last Post: 08-05-2009, 05:43 AM
  5. Use Case Scenarios
    By scott.weppler in forum Access
    Replies: 0
    Last Post: 05-31-2009, 12:15 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums