Results 1 to 11 of 11
  1. #1
    barrettp is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    5

    Forcing text to upper case


    Hello,

    I am trying to use a form to populate a table and would like to know how I can make the text all upper case, no matter what was entered in the form?

    I know this is probably very easy, but nothing I've tried has worked.

    HELP!

    Thank you for any help you can provide.

  2. #2
    ConneXionLost's Avatar
    ConneXionLost is offline Simulacrum
    Windows XP Access 2003
    Join Date
    Jan 2010
    Location
    Victoria, Canada
    Posts
    291
    Go to the table in design mode.

    Select the field you want to change.

    In the field properties, add a "Validation Rule" similar to this:

    Code:
    StrComp(UCase([YourFieldName]),[YourFieldName],0)=0
    Change the field name where appropriate in the rule.

    You may also want to add some validation text like:

    "Must be UPPERCASE".

    Cheers,

  3. #3
    kimmer is offline Competent Performer
    Windows 7 Access 2010 (version 14.0)
    Join Date
    May 2010
    Posts
    100
    Alternatively, you can place a > (greater than symbol) in the Format property of the textbox. This will make the text display in uppercase.

  4. #4
    barrettp is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    5
    Thank you kimmer - that's exactly what I needed!

  5. #5
    barrettp is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    5
    Thank you for your response! I think using the ">" will work for what I need, but I appreciate the feedback.

  6. #6
    Jim Doherty is offline Novice
    Windows XP Access 2000
    Join Date
    May 2010
    Location
    Derbyshire,England. UK
    Posts
    20
    If you want an alternative put the following in the OnKeyPress event of the relevant textbox on your form this will ensure that anything typed into the textbox is stored in the table as uppercase

    Code:
     
    Dim Character
    Character = Chr(KeyAscii)
    KeyAscii = Asc(UCase(Character))

  7. #7
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    For the record, using the > in the Format property of the TextBox changes the display but does not change what is stored.

  8. #8
    barrettp is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    5
    Okay, I used the code that was provided and nothing happened - all text is still lowercase. I also tried the validation rule in the table itself, but I am trying to store the text as uppercase no matter how it is entered - I would prefer it if people didn't have to enter as caps.

    Thank you for all the suggestions - I'll keep looking.

  9. #9
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Did you try the suggestion in Post #6?

  10. #10
    barrettp is offline Novice
    Windows XP Access 2007
    Join Date
    May 2010
    Posts
    5
    Yes, I did. I tried before and it didn't appear to work, but now it looks good. I think that answered my question - thanks.

    I appreciate the help.

  11. #11
    RuralGuy's Avatar
    RuralGuy is offline Administrator
    Windows 7 Access 2007
    Join Date
    Mar 2007
    Location
    8300' in the Colorado Rocky Mountains
    Posts
    12,922
    Excellent! Are you ready to follow the link in my sig and mark this thread as Solved?

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

Similar Threads

  1. upper left button
    By julienb in forum Forms
    Replies: 0
    Last Post: 03-02-2010, 07:55 AM
  2. Replies: 3
    Last Post: 10-15-2009, 12:24 PM
  3. Converting all text input to lower case
    By aommaster in forum Forms
    Replies: 6
    Last Post: 08-05-2009, 05:43 AM
  4. Use Case Scenarios
    By scott.weppler in forum Access
    Replies: 0
    Last Post: 05-31-2009, 12:15 PM
  5. is access case-sensitive?
    By pen in forum Programming
    Replies: 1
    Last Post: 04-07-2009, 05:13 AM

Tags for this Thread

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