Creates a temporary buffer in memory for a record that is based on the structure of the current table, letting the user input data to the record without automatically adding the record to the table.

Syntax

<oRef>.beginAppend( )

<oRef>

An object reference to the form.

Property of

Form, SubForm

Description

Use beginAppend( ) for form-based data handling with tables in work areas. When using the data objects, beginAppend( ) has no effect; use the rowset’s beginAppend( ) method instead.

beginAppend( )creates a single record buffer in the current table, without actually adding the record to the table until saveRecord( ) is issued. While this buffer exists, the user can input data to the record with controls such as an entry field or a check box. Use saveRecord( ) to append the record to the currently active table, and use abandonRecord( ) to discard the record. Calling beginAppend( ) instead of saveRecord( ) will write the new record and empty the buffer again so you can add another record. Use isRecordChanged( ) to determine if the record has been changed since the beginAppend( )was issued.

When appending records with beginAppend( ) the new record will not be saved when you call saveRecord( ) unless there have been changes to the record; the blank new record is abandoned. This prevents the saving of blank records in the table. (If you want to create blank records, use APPEND BLANK). You can check there have been changes by calling isRecordChanged( ). If isRecordChanged( ) returns true, you should validate the record with form-level or row-level validation before writing it to the table.

Using beginAppend( ) has different results than using either BEGINTRANS( ) and APPEND BLANK or APPEND AUTOMEM. With these commands, if you cancel the append operation, you have a record marked as deleted added to the table. If you use abandonRecord( ) to cancel the beginAppend( ) operation, a new record is never added to the table.