How to: Control the Record Export Process
When exporting, you can specify a condition that must be met to continue evaluating and selecting records. You enter this condition as a WHILE expression.
As long as the WHILE expression remains true, Visual FoxPro processes the source table. After finding a record that does not meet the condition, Visual FoxPro ends the evaluation process and exports the selected records. This option allows you to export records based on information outside of the values contained in the fields.
Tip
If you use a WHILE expression on a file that has not been indexed, the export process may end before evaluating all of the appropriate records. Before performing the export procedure, be sure the source table has the appropriate index active for the WHILE expression you want to use.
To enter criteria for ending record export
From the File menu, choose Export.
Enter the source table and destination file information.
Choose While to build an expression in the Expression Builder dialog box.
Note
You do not need to include the WHILE command in the statement. For example, type sales > 1000 to see only sales above one thousand dollars.
Choose OK.
Visual FoxPro exports the records it evaluates while the expression is true.
See Also
Tasks
How to: Export Data to New Files
How to: Export a Quantity or Range of Records
How to: Export Records That Match Conditions
How to: Export Numeric or Currency Values