ACC2000: Can't Filter by Partial Selection in Data Access Page

ID: Q199976


The information in this article applies to:

Moderate: Requires basic macro, coding, and interoperability skills.

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


SYMPTOMS

You may not get the records you expect when you use Filter by Selection on a data access page.


CAUSE

When a bound field has focus, Filter by Selection filters based on the entire contents of the control, even if you have only a portion of the text in that control selected. For example, if you have the word "Confections" in a control, you cannot select just the first two letters and use Filter by Selection to filter all records that start with "Co" (or Like Co*). In a data access page, the filter will result in only records that contain the whole word, "Confections."


MORE INFORMATION

Filter by Selection in a data access page does not use a partial selection as does Filter by Selection in a form.

Filter By Selection in data access pages is additive. If you apply a filter for the value of one field and then filter on another field without removing the first filter, the resulting filter will be an AND of the two filters. The Filter toggle button will remove and reapply the filter created during a session.

Steps to Reproduce Behavior

  1. Open the Customers form in the sample database Northwind.mdb. If you have not made any changes to the Northwind.mdb, There should be 91 records.


  2. Click just the "A" of ALFKI in the CustomerID field.


  3. On the Records menu, click Filter, and then click Filter by Selection. Note that the filter limits the number of records to four.


  4. Create a new data access page named Customers and set the following property:


  5. 
       RecordSource: Table: Customers 
  6. On the Edit menu, click Select Page and change the following property:


  7. 
       Id: Customers 
  8. Add the following controls to the Customers page and set the properties of the controls as indicated:


  9. 
       Text Box
       --------
          Id: CustomerID
          ControlSource: CustomerID
    
       Text Box
       --------
          Id: CompanyName
          ControlSource: CompanyName 
  10. On the View menu, click Page View. Note that there are 91 records.


  11. Select just the "A" of ALFKI in CustomerID field.


  12. On the Navigation control, click Filter by Selection. Note that the filter limits the number of records to one.


Additional query words: DAP prb


Keywords          : kbdta AccDAP 
Version           : WINDOWS:2000
Platform          : WINDOWS 
Issue type        : kbprb 

Last Reviewed: July 8, 1999