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

Article translations Article translations
Article ID: 304258 - View products that this article applies to.
This article was previously published under Q304258
Moderate: Requires basic macro, coding, and interoperability skills.

This article applies to a Microsoft Access database (.mdb) and to a Microsoft Access project (.adp).

Expand all | Collapse all

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.

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.

Properties

Article ID: 304258 - Last Review: July 14, 2004 - Revision: 1.1
APPLIES TO
  • Microsoft Access 2000 Standard Edition
Keywords: 
kbhowto KB304258

Give Feedback

 

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com