en uk

Using a filter criteria Microsoft Access 2007

    Searching for an exact match in a field can be handy, but sometimes you may want to see records that meet certain criteria, such as finding the names of everyone whose salary is greater than $50,000 a year. Instead of filtering by an exact match, you have to define the filter criteria.

    The type of data stored in each field determines the type of criteria you can create. Three common types of data stored in fields include Text, Numbers, and Dates, which you can filter in different ways, as shown in Table 17-1.

    Field Data Type

    Filtering Criteria

    Description

    Text

    Equals

    Field must match filter text exactly.

    Does Not Equal

    Field must not match filter text.

    Begins With

    Field must start with the filter text.

    Does Not Begin With

    Field must not begin with the filter text.

    Contains

    Field must contain the filter text.

    Does Not Contain

    Field must not contain any part of the filter text.

    Ends With

    Field ends with the filter text.

    Does Not End With

    Field does not end with the filter text.

    Numbers

    Equals

    Field must equal filter number.

    Does Not Equal

    Field must not equal filter number.

    Less Than or Equal To

    Field must contain a number less than or equal to the filter number.

    Greater Than or Equal To

    Field must contain a number greater than or equal to the filter number.

    Between

    Field must contain a number that falls between two filter numbers.

    Dates

    Equals

    Field must equal the filter date.

    Does Not Equal

    Field must not equal the filter date.

    On or Before

    Field date must be equal or earlier than the filter date.

    On or After

    Field date must be equal or later than the filter date.

    To create the filter criteria, follow these steps:

    1. In the All Tables pane on the left of the screen, double-click the name of the database table you want to filter.

    Access displays the Datasheet view of your database.

    2. Click the Home tab.

    3. Click in the field (column) that you want to use as a filter.

    4. Click the Filter icon in the Sort & Filter group.

    A pop-up menu appears (refer to Figure 17-2).

    5. Select the Filters option, such as Text Filters or Number Filters.

    A submenu of filter options appears, as shown in Figure 17-5.

    Using a filter criteria Microsoft
Access 2007

    Figure 17-5:

    The Filter

    Pop-up menu lets you specify the criteria for a spe­cific field.

    6. Click a filter option, such as Between or Less Than.

    The Custom Filter dialog box appears, as shown in Figure 17-6. The Custom Filter dialog box contains the name of your filter option such as Between Numbers.

    Using a filter criteria Microsoft
Access 2007

    Figure 17-6:

    Type in a value for your filter criteria.

    7. Type in one or more values in each text box displayed in the Custom Filter dialog box and then click OK.

    Access filters your database table according to your criteria.

    8. Repeat Steps 5-7 for each additional filter you want to add.




BACK NEXT TOP

Site is a private collection of materials and is an amateur informational and educational resource. All information is obtained from public sources. The administration does not apply for authorship of the materials used. All rights belong to their owners.