Microsoft KB Archive/275066

= ACC2002: Filter By Selection Does Not Handle Wildcard Characters Well =

Article ID: 275066

Article Last Modified on 11/5/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q275066



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

This article applies only to a Microsoft Access database (.mdb).



SYMPTOMS
When you use the question mark (?) or the asterisk (*) character as the criteria for a &quot;Filter By Selection,&quot; the filter is not applied.



CAUSE
Microsoft Access interprets the ? and the * characters as wildcard characters.



RESOLUTION
Manually insert square brackets ([ ]) around the character in the filter statement. To see an example of how to do this, follow these steps:
 * 1) Select the character on which to filter.
 * 2) On the Records menu, point to Filter, and then click Advanced Filter/Sort.
 * 3) Change the criteria from Like &quot;*?*&quot; to Like &quot;*[?]*&quot;.
 * 4) On the Filter menu, click Apply Filter/Sort.

Note that only records that contain ? are returned.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed at the beginning of this article.



Steps to Reproduce the Behavior
 Start Microsoft Access and create a new database.  Create the following table:   Table: Table1 -  Field Name: F1   Data Type: Number

Field Name: F2  Data Type: Text   Switch to Datasheet view, and enter the following data:   F1    F2   1    AAA 2   A?B 3   BBB 4   B?A  Select &quot;?&quot; in the F2 field of the second record (A?B).</li> On the Records menu, point to Filter, and then click Filter By Selection.</li></ol>

All records appear in the filtered results. To see the filter statement that was created, point to Filter on the Records menu, and then click Advanced Filter/Sort.

Additional query words: pra

Keywords: kbbug kbnofix KB275066

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.