Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Filter Uppercase Char! (Access 2000 >)

    Hi all;
    Is there a way to filter a string for uppercase?
    If I create a new calculated field in a query to filter all email addresses that start with an uppercase char, how would I set it up?
    eg. =IIF(UCASE(LEFT([Email],1))=TRUE,"Yes","No")....
    This obviously does not work!

    Thanx
    Regards,
    Rudi

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Filter Uppercase Char! (Access 2000 >)

    UCase is a function that converts a string to upper case; it does not test if a string is in upper case. You can use the Asc function; it returns the numeric value of the first character in the string. Since upper case letters are 65 ... 90 and lower case letters are 97 ... 122, you could use this expression:

    Asc([Email])

    and put < 91 in the Criteria line, or Between 65 And 90 if you want to be precise.

  3. #3
    Gold Lounger
    Join Date
    Feb 2004
    Location
    Cape Town, RSA
    Posts
    3,444
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Filter Uppercase Char! (Access 2000 >)

    Thanx Hans (aka: Flash Gordon) - didn't even give me chance to get a cup of coffee and the answer was already provided!!!!

    Works beautifully!
    Regards,
    Rudi

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •