ACC: Find Does Not Work with Fields Containing # Character

Last reviewed: May 28, 1997
Article ID: Q109360
The information in this article applies to:
  • Microsoft Access versions 1.0, 1.1, 2.0, 7.0, 97

SYMPTOMS

Novice: Requires knowledge of the user interface on single-user computers.

You cannot use the Find command to find fields containing the number sign character (#).

CAUSE

The number sign character is a control character in Microsoft Access; the Find command does not treat it as it does regular characters.

RESOLUTION

To search for the number sign character (or any control character), you must place brackets around the control character. For example, to search for a record containing the text string "hello#", you would enter:

   hello[#]

STATUS

This behavior is by design.

MORE INFORMATION

Steps to Reproduce Behavior

  1. Open the sample database Northwind.mdb (or NWIND.MDB in versions 1.x and 2.0).

  2. Open the Categories table in Datasheet view and add the following record:

          Category Name: Test Find
          Description: Hello#
    

  3. Click in the Description field of any record in the Categories table above the one you just entered.

  4. On the Edit menu, click Find. Set the following options in the Find in Field: 'Description' dialog box:

    In Microsoft Access 7.0 and 97:

          Find What: Hello#
          Search: All
          Match: Whole Field
          Search Only Current Field: True (click this option)
    

    In Microsoft Access 1.x and 2.0:

          Find What: Hello#
          Where: Match Whole Field
          Search In: Current Field
          Direction: Down
    

  5. Click Find First. Note that Microsoft Access does not find the record.

  6. Repeat step 4, but type Hello[#] in the Find What box.

  7. Click Find First. Note that this time the record is found.

REFERENCES

For more information about using special characters with the Find feature, search the Help Index for "finding data, ways to."

For more information about control characters, search the Help Index for "wildcard characters."


Keywords : GnlFnd kbusage
Version : 1.0 1.1 2.0 7.0 97
Platform : WINDOWS
Hardware : X86
Issue type : kbprb
Resolution Type : Info_Provided


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: May 28, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.