Using the Record Navigation Control s Filter and Sort Features

Using the Record Navigation Control's Filter and Sort Features

graphics/filter_by_selection.gif graphics/sort_ascending.gif Filtering by selection and sorting with the record navigation control is similar to using the filter and sort buttons of the toolbar in Datasheet view. The Quarterly Orders by Product query returns 947 rows, so filtering by Customer is useful to display a subset of the data for a single customer. You can also perform an ascending or descending sort on any field or column, and you can combine filters and sorting.

Sorting and filtering records in DAP follows a pattern similar to that for conventional Access datasheets, forms, and reports. To experiment with the record navigation control's filter and sort features with the Quarterly Orders by Product page, do the following:

  1. graphics/filter_by_selection.gif Click the Customer column's text box to select the field, and then click the Filter by Selection button. When you apply a filter, the Toggle Filter Button changes to the depressed state. If you selected the first record for ANTON (Antonio Moreno Taqueri[as]a), the filter returns 13 records, as illustrated by Figure 24.24.

    Figure 24.24. Applying Filter by Selection to the underlying Recordset limits the records displayed in the section to the records that have the same value as the on you select in a text box. Test the filter by clicking the Last button.

    graphics/24fig24.gif

  2. graphics/apply_filter.gif Click the Toggle Filter Button to remove the filter. The caption of the Record Navigation control confirms that the original 947 records are accessible.

  3. graphics/sort_descending.gif Click one of the Qtr field text boxes, and then click the Sort Descending button to display the largest dollar value of an order in that quarter of 1997. After you apply a sorting sequence, the sort buttons are disabled until you select another field. Figure 24.25 shows the result of a descending sort on the Qtr 1 column.

    Figure 24.25. Sorting operations on alphabetic and numeric fields of a page are identical to that for Datasheet or Form view. Why a customer in Copenhagen would purchase this much French wine from a U.S. firm is the second unsolved mystery of this chapter.

    graphics/24fig25.gif

  4. graphics/apply_filter.gif Click to select the ProductName field, and then click the Apply Filter button to restrict the active records to a single product, Co[af]te de Blaye, for this example.

  5. graphics/last_record.gif graphics/first_record_navigation.gif Click the Qtr 2 field text box, apply a descending sort, and click the Last and First record buttons to display the largest order for the selected product in 1997Q2.

Note

Provide a hyperlinked help page for users of your DAP who don't have experience with Access filtering and sorting techniques. You can write your help pages with any HTML editing tool, such as FrontPage 2003. If only a brief explanation is required, you can add the text to the empty header element of the page.




Special Edition Using Microsoft Office Access 2003
Special Edition Using Microsoft Office Access 2003
ISBN: 0789729520
EAN: 2147483647
Year: 2005
Pages: 417

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net