Fills fields in records with blanks.


[FOR <condition 1>]
[WHILE <condition 2>]
 <field list> | [LIKE <skeleton 1>] [EXCEPT <skeleton 2>]]

FOR <condition 1>
WHILE <condition 2>

The scope of the command. The default scope is NEXT 1, the current record only.

FIELDS <field list> | LIKE <skeleton 1> | EXCEPT <skeleton 2>

The fields to blank. Without FIELDS, BLANK replaces all fields. If you specify FIELDS LIKE <skeleton 1>, the BLANK command restricts the fields that are blanked to the fields that match <skeleton 1>. Conversely, if you specify FIELDS EXCEPT <skeleton 2>, the BLANK command makes all fields blank except those whose names match <skeleton 2>.


Rebuilds all open indexes after BLANK finishes executing. Without REINDEX, dBASE Plus updates all open indexes after each record is made blank. When the current table has multiple open indexes or contains many records, BLANK executes faster with the REINDEX option.


Use BLANK to blank-out fields or records in the current table. BLANK has the same effect as using REPLACE on each field with a null value. For DBF7, DB, and SQL tables, the fields are replaced with null values. For earlier versions of DBF tables, the fields are replaced with blanks (spaces). EMPTY( ) and ISBLANK( ) return true for a field whose value has been replaced using BLANK. BLANK fills an existing record with the same values as APPEND BLANK. Updates to open indexes are performed after each record or a set of records is blanked.

The distinction between blank and zero values in numeric fields can be significant when you use commands such as AVERAGE and CALCULATE.

For earlier DBF tables, blank numeric fields evaluate to zero and blank logical or boolean fields evaluate to false. In DBF7 tables, which support true null values, the value of the field is null, although some commands may display the null value as zero or false.


Use a loop to assign null values to the value properties of the Field objects.