ACC: Cannot Apply a Filter to a SubformLast reviewed: April 2, 1997Article ID: Q112796 |
The information in this article applies to:
SUMMARYModerate: Requires basic macro, coding, and interoperability skills. You cannot use the ApplyFilter action to apply a filter to a subform. If you try to do so, the filter is applied to the main form instead. In Microsoft Access version 1.x, you can achieve some of this functionality by basing the subform on a parameter query. In the other versions of Microsoft Access, you can get the same results by changing the subform's RecordSource property.
MORE INFORMATIONThe ApplyFilter action dynamically restricts or sorts the records in a table or the records from a form or report's underlying table or query. Although you cannot use this action with a subform, you can change the subform's RecordSource property to achieve the same results. The following example demonstrates how to change the sort order of a subform by changing the subform's RecordSource property. It uses the Categories form and Product List subform in the sample database Northwind.mdb (or the Categories form and Categories Subform subform in the sample database NWIND.MDB in 2.0). CAUTION: Following the steps in this example will modify the sample database Northwind.mdb. You may want to back up the Northwind.mdb file or perform these steps on a copy of the Northwind database.
REFERENCESFor more information about the RecordSource property, search for "RecordSource Property" using the Microsoft Access 97 Help Index. |
Keywords : FmsProp kbusage
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |