Microsoft KB Archive/304523

= ACC2002: Filter By Form Does Not Filter Data That Has Commas in It =

Article ID: 304523

Article Last Modified on 9/25/2003

-

APPLIES TO


 * Microsoft Access 2002 Standard Edition

-



This article was previously published under Q304523



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

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



SYMPTOMS
When you view a table in Datasheet view, filter by form does not filter data that has commas in it if all of the following conditions are true:
 * The display control is a combo box.
 * The bound column is hidden.
 * The displayed column is concatenated with data that has a comma in it.

Additionally, you receive the following error messages:

The expression you entered contains invalid syntax, or you need to enclose your text data within quotes.

Microsoft Access didn't build the filter.



RESOLUTION
To find the records that have commas in them, enclose the data that you want to filter by in quotation marks.

For example, change Buchanan, Steven to &quot;Buchanan, Steven&quot; in the Steps to Reproduce the Behavior section to see all the records about Steven Buchanan.



Steps to Reproduce the Behavior

 * 1) Start Access.
 * 2) On the Help menu, point to Sample Databases, and then click Northwind Sample Database.
 * 3) In the Database window, click Tables under Objects, click the Orders table, and then click Open.
 * 4) On the Records menu, point to Filter, and then click Filter By Form.
 * 5) Click in the empty row cell under Employee, click the arrow, and then click Buchanan, Steven.
 * 6) On the Filter menu, click Apply Filter/Sort.

Note that you receive the error message that is mentioned in the &quot;Symptoms&quot; section of this article.

Additional query words: doesn't

Keywords: kbprb KB304523

-

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

© Microsoft Corporation. All rights reserved.