Filtering in Forms

From NeoWiki

Revision as of 00:43, 15 October 2007 by Lorinda (Talk | contribs)
Jump to: navigation, search
This article is part of the To Base and Back Again tutorial series.

Earlier, we discussed Filtering in Queries and Tables. Now we will look at how to filter in forms. We will do so working with the All Sightings form we created in the last tutorial.

Contents

Accessing Form Based Filters

  1. Open the All Sightings form. (In the main database document, click on the Forms icon in the left-hand column, then double click on All Sightings.)
  2. Make sure that the Form Navigation toolbar is visible. If it is not, go to the View menu, choose Toolbars and then Form Navigation.
  3. Click on the Form Based Filters button. It is the the button circled in red below:

    Image:FormBasedFilters.png

    The Form Filter floating window appears, and the form goes blank. In the case of a data sheet/table, like the All Sightings form, only one empty row is shown.

Sample Filters

Filter by state

  1. Click in the cell under the State heading and type BZ
  2. Click on the funnel icon in the Form Filter window. After a brief pause, all records where the state is BZ appear.
  3. Click on the Remove Filter/Sort button on the toolbar (The red stop sign with an x) to clear the filter.

Filtering on two fields (AND)

  1. Click on the Form Based Filters button again
  2. Click on the check box under the Male heading to check it
  3. Now click on the Filter Navigation icon in the Form Filter window. (This is the navigator icon with a small funnel on it). A Filter Navigator window will open. It looks like this:
    Image:FilterNavigator.png
    Notice that a TRUE condition is represented by a 1 in this window.
  4. In the Filter Navigator, click on the words Filter For next to the first funnel
  5. Now click on the checkbox under the Female heading. The words Female: 0 will appear right below Male: 1.
  6. Click on the checkbox under the Female heading again to set the condition to Female: 1
  7. Click the funnel icon in the Form Filter window. After a brief pause, all records where both Male and Female birds of the same species were seen appear.
    Note that if you had left the Female field set at 0 in the navigator, you would have found those records when only males were seen. Unlike queries, where a criteria of Male = TRUE and Female = FALSE would exclude those records where the Female field is recorded as a NULL, form based filters (in my testing) treat a NULL value in a Boolean (Yes/No or TRUE/FALSE) field as a False. So these records are not excluded
  8. 'Do Not clear the filter before continuing with the next example.

Filtering on two fields (OR)

  1. Click on the Form Based Filters button again
  2. If the Filter Navigator window is not open, click on the Filter Navigation button
    Notice the "Or" between the two funnel images. Conditions under any particular funnel function as AND conditions; that is, all of them must be true. But the different funnels represent OR conditions.
  3. Right click on the line that say Female: 1 and select Delete from the contextual menu
  4. Click on the second (empty) funnel in the Filter Navigator Window. The form will clear again.
  5. Click on the check box under the Juvenile box
  6. You may need to click on the flippy triangle to see the entry under the second funnel.
  7. If necessary, click a second time so that the condition under the second funnel reads Juvenile: 1
  8. Click on the funnel icon to see the results
Personal tools