Article ID: 109360
Article Last Modified on 1/18/2007
APPLIES TO
- Microsoft Access 1.0 Standard Edition
- Microsoft Access 1.1 Standard Edition
- Microsoft Access 2.0 Standard Edition
- Microsoft Access 95 Standard Edition
- Microsoft Access 97 Standard Edition
This article was previously published under Q109360
Novice: Requires knowledge of the user interface on single-user computers.
SYMPTOMS
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[#]
MORE INFORMATION
Steps to Reproduce Behavior
- Open the sample database Northwind.mdb (or NWIND.MDB in versions 1.x and 2.0).
Open the Categories table in Datasheet view and add the following record:
Category Name: Test Find Description: Hello#
- Click in the Description field of any record in the Categories table above the one you just entered.
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
- Click Find First. Note that Microsoft Access does not find the record.
- Repeat step 4, but type Hello[#] in the Find What box.
- 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: kbprb kbusage KB109360