Notice: This website is an unofficial Microsoft Knowledge Base (hereinafter KB) archive and is intended to provide a reliable access to deleted content from Microsoft KB. All KB articles are owned by Microsoft Corporation. Read full disclaimer for more details.

ACC2000: How to Find Records That Have Uppercase, Lowercase, or Mixed-Case Data


View products that this article applies to.

Summary

This article shows you how to create a query that returns records that have the data in a particular case (for example, uppercase, lowercase, or mixed case). For example, assume that the following data is in the table:
AddProperty
address
ADDRESSPAIR
ADDRESSTABLE
AddressToString
andexp
AttachPropertyInstance
AttachPropertyInstanceEx
BERGetHeader
BERGetInteger
BERGetString
BLOB_TABLE
BuildINIPath
Use one of the following methods to find the data in the case that you want.

↑ Back to the top


More information

Method 1: To Find All the Records in a Field That Contain Uppercase Text

  1. Create a new query in Design view.
  2. In the Show Table dialog box, click the table that contains the data, and then click Add.
  3. Add the field that contains the data to the query design grid.
  4. In the next open Field cell in the query design grid, type or paste the following:
    Upper:StrComp(UCase([Field1]), [Field1],0)
  5. In the Criteria row under Upper, type 0.

Method 2: To Find All the Records in a Field That Contain Lowercase Text

  1. Create a new query in Design view.
  2. In the Show Table dialog box, click the table that contains the data, and then click Add.
  3. Add the field that contains the data to the query design grid.
  4. In the next open Field cell in the query design grid, type or paste the following:
    Lower:StrComp(LCase([Field1]), [Field1],0)
  5. In the Criteria row under Lower, type 0.

Method 3: To Find All the Records in a Field That Contain Mixed-Case Text

  1. Create a new query in Design view.
  2. In the Show Table dialog box, click the table that contains the data, and then click Add.
  3. Add the field that contains the data to the query design grid.
  4. In the next open Field cell in the query design grid, type the following:
    Upper:StrComp(UCase([Field1]), [Field1],0)
  5. In the Criteria row under Upper, type <> 0.
  6. In the next open Field cell in the query design grid, type the following:
    Lower:StrComp(LCase([Field1]), [Field1],0)
  7. In the Criteria row under Lower, type <> 0.

↑ Back to the top


Keywords: KB304258, kbhowto

↑ Back to the top

Article Info
Article ID : 304258
Revision : 2
Created on : 7/14/2004
Published on : 7/14/2004
Exists online : False
Views : 263