|Access Tip of the Day
Easily apply successive filters to a recordset (Access 97/2000/2002)
The Filter By Selection feature is one of the easiest ways to limit which records are displayed in a datasheet or form. If you're interested in seeing only the records containing a certain field value, you simply place your insertion point in the field containing that value and click the Filter By Selection button (or choose Records | Filter | Filter By Selection from the menu bar).
What you may not realize is that you can apply successive filters to the records using this technique. For instance, let's say that you have a query that returns information about sales orders. Among the fields returned are Country, SalesRep, and a calculated expression named OrderYear.
Initially, the query datasheet displays all records. However, you can use the Filter By Selection feature to show only the orders placed in Canada. Then, you can further filter the results to show only the sales made to Canadian customers in a particular year by selecting the appropriate OrderYear field value and once again clicking the Filter By Selection button. If more than one sales rep was assigned to the geographic region during that year, you can isolate one rep's results by selecting his name and once more clicking the Filter By Selection button. Even though that rep may have made sales to customers in other countries, only sales made in Canada during the specified year are listed.
(Content provided by Element K Journals)
Copyright © 2001 - 2018 MJ Technologies, LLC. All rights reserved.