ACC2000: How to Add a Group Filter Control to a Data Access Page

This article was previously published under Q201011
This article has been archived. It is offered "as is" and will no longer be updated.
Novice: Requires knowledge of the user interface on single-user computers.

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

This article shows you how to create and use a Group Filter control on a data access page. The example in this article uses the sample database Northwind.mdb.
More information
A Group Filter control is a drop-down list box with a Select Distinct clause, sorted in Ascending order for a specified field in the section's recordset. The Group Filter control controls the current recordset for that level of the hierarchy. By default, the Group Filter control has no value. This means that when you create a section with a Group Filter control on it, there are no records available until you select a value from the drop-down list. At this point, that level of the hierarchy is populated, and any children it may have are also populated.

This type of control can be compared to a combo box on a form that finds a record on that form based on the value selected in the combo box. The control itself is not bound to the underlying recordset; it merely provides you an interface for selecting records.

Each group or level of a data access page can contain a single Group Filter control. When you place a second Group Filter control in a section, the original control is "demoted" to a drop-down list. The properties that determine which drop-down list in a section, if any, are to be implemented as a Group Filter control are Group Filter Control and Group Filter Field. Although you can use a wizard to help you create a Group Filter control, you can also set these properties manually. You can access both properties through the Sorting and Grouping dialog box.

To create a Group Filter control:
  1. Open the sample database Northwind.mdb.
  2. Create a new data access page based on the Customers table.
  3. If the field list is not displayed, click Field List on the View menu.
  4. Add all the fields from the Customers table from the field list to the data access page.
  5. Right-click the CompanyName control on the data access page, and then click Promote on the shortcut menu.
  6. If the toolbox is not displayed, click Toolbox on the View menu.
  7. Click the Dropdown List control in the toolbox.
  8. With the Dropdown List control still selected in the toolbox,right-click the Country field in the field list, hold down the right mouse button, and then drag the Country field from the field list to the Customers section of the data access page.
  9. When you drop the field on the data access page, a shortcut menu appears. On this shortcut menu, click Group Filter Control.
  10. On the View menu, click Page View. Note that all of the controls appear on the data access page, but that neither the input box, nor the drop-down list displays any data.
  11. In the drop-down list, select one of the countries. Note that the input box is populated with the first customer from this country and that the record navigation control displays Customers 1 of n, where n is the number of customers in this country.

    With each change of the value in the Group Filter control, the currency of the section changes, as does the number of records in the navigation control.
inf context

Article ID: 201011 - Last Review: 10/25/2013 22:04:00 - Revision: 3.0

Microsoft Access 2000 Standard Edition

  • kbnosurvey kbarchive kbdap kbhowto KB201011