共用方式為


Customizing Tables

You can customize your tables so that only certain records are displayed by setting a filter on the table. You can also restrict access to certain fields in a table by setting a field filter, which allows you to select which fields to display.

Filtering a Table

If you want to see only records of a certain type, you can set a filter to limit the records shown in the Browse window. Filtering is useful when, for example, you want to restrict the browse to show only sales above a certain amount, or employees in a range of hire dates.

To set a filter, use the Work Area Properties dialog box, available through the Properties command on the Table menu.

To set a filter on a table

  1. Browse the table you want to filter.

  2. From the Table menu, choose Properties.

  3. In the Work Area Properties dialog box, enter your filter expression directly in the Data filter box.

    -or-

  • Choose the dialog button under Data Filter, and in the Expression Builder, create an expression to select the records you want to see and choose OK.

When you browse the table, you see only records that are selected by the filter expression.

For example, using the Customers table from the Visual FoxPro \Samples\Data directory, you could focus on customers residing in the United States by entering the following expression in the Data Filter box:

Customer.Country = "USA"

See Also

Table Creation | Naming a Table | Deleting a Database Table | Working with Tables | Deleting a Free Table | Duplicating a Table | Viewing Data in Tables | Customizing a Browse Window | Moving Around in a Table | Renaming a Table