Results 1 to 4 of 4
  1. #1
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Filtering for upper case data

    I have a large database of addresses and I'm trying to clean it up a bit. Some address data has been entered in upper case and I'm trying to filter for these records, so they can be changed.
    I have a backup plan of changing ALL of the records to Upper 1st character, but that means I then have to filter and change all O'* and Mc*/Mac* names such as McDonald.
    I'm using Access 97 on Win NT. Any help would be much appreciated.

  2. #2
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    The Netherlands
    Posts
    216
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filtering for upper case data

    Try using the function asc().
    Any character <97 is uppercase.
    Be careful! asc("aZZ") = 97! Only the first character is evaluated then!

  3. #3
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts

    Re: Filtering for upper case data

    Hi Phil,
    You should be able to do this in a query if you add a column with an expression like:
    upper: StrComp([fieldname],UCase([fieldname]),0)
    with a criterion of 0 (zero not O) for this column.
    Hope that helps.
    Regards,
    Rory

    Microsoft MVP - Excel

  4. #4
    4 Star Lounger
    Join Date
    Feb 2001
    Location
    Gillingham, Kent, England
    Posts
    511
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Filtering for upper case data

    Thanks for the help guys. I found, out of 131,000 records only 1045 had only upper case, which is less than I thought there would be.
    I have used both strcomp & Ucase before, but it didn't occur to me I could use them together.

Posting Permissions

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