How do I find the text which is entered in UPPER CASE

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • CathyL
    New Member
    • Mar 2010
    • 1

    How do I find the text which is entered in UPPER CASE

    Using Access, I need to identify which records in my database are entered in UPPER CASE.

    I don't want to convert to lower case. I simply need to know which records need have this problem.

    Thanks

    CathyL
  • TheSmileyCoder
    Recognized Expert Moderator Top Contributor
    • Dec 2009
    • 2322

    #2
    I don't know if there is a native SQL way of doing this, but try adding this as a field to your normal select Query

    Code:
    expr1: StrComp([tx_Main];UCase([tx_Main]);0)=0
    And then add as a criteria that this field must be true.

    Simply replace tx_Main with the name of the field you want to check for Uppercase.

    If your having trouble making it work, try to poste your normal SQL select query here, and I can help you adept it.

    Explanation:
    StrComp will compare the first and second argument, and return 0 if they are equal to each other. (which is why I added the =0 to the end)
    The 3rd argument passed to strCompare is a 0, telling strCompare to use binary comparison (in which "a" not equal "A"), as composed to Textual comparsion (in which "a"="A").

    The Ucase converts the field to upper case. So the logic is that if the Uppercase converted field is equal to the non-converted field, the field must have been uppercase to begin with.
    Last edited by TheSmileyCoder; Mar 10 '10, 09:22 PM. Reason: Added explanation

    Comment

    • TheSmileyCoder
      Recognized Expert Moderator Top Contributor
      • Dec 2009
      • 2322

      #3
      Curious, did this work for you?

      Comment

      Working...