Adds one or more new records to the end of a table.
APPEND [BLANK] [IN nWorkArea | cTableAlias] [NOMENU] |
Parameters
- BLANK
- Adds one blank record to the end of the current table. Visual FoxPro does not open an editing window when you issue APPEND BLANK. You can edit the new record with BROWSE, CHANGE, or EDIT.
- IN nWorkArea
- Specifies the work area of the table to which a new record is appended.
- IN cTableAlias
- Specifies the alias of the table to which a new record is appended. If you omit nWorkArea and cTableAlias, a new record is appended to the table in the currently selected work area. If you issue APPEND, a blank record is added to the table you specify with nWorkArea or cTableAlias and the table is automatically selected. If you issue APPEND BLANK, a blank record is added to the table you specify with nWorkArea or cTableAlias and the table is not selected.
- NOMENU
- Specifies that the Table menu title is removed from the system menu bar, preventing changes to the format of the editing window.
Remarks
When you issue APPEND or APPEND BLANK and a table isn't open in the currently selected work area, the Open dialog appears so that you can choose a table to which you can append records.
APPEND opens an editing window so you can enter data into one or more new records. When you add a new record, Visual FoxPro updates any indexes that are open.
Example
The following example uses APPEND BLANK to create a table with 10 records containing random values, and then displays the maximum and minimum values in the table.
В | Copy Code |
---|---|
CLOSE DATABASES CREATE TABLE curRandom (nValue N(3)) FOR nItem = 1 TO 10 APPEND BLANK REPLACE nValue WITH 1 + 100 * RAND( ) ENDFOR CLEAR LIST SELECT MIN(nValue) as nMinimum, MAX(nValue) AS nMaximum; FROM curRandom INTO CURSOR curMinMax ? 'The minimum value is: ', nMinimum ? 'The maximum value is: ', nMaximum CLOSE DATABASES |