Fired before the user creates new records at the end of the table.

Parameters

ParameterDescription
RecordIndex to the location of the first new record
CountThe number of records added
CauseThe name of what caused the new records

Remarks

The BeforeNewRecords event is fired when the user tabs out of the last data record but before a new record is created at the end of the table. To prevent the new record from being created, set the Cancel property to 1. Also, if the NewRowCount is set to 0, then this event never fires since the user can never add new records.

The NewRowCount property cannot be changed if the RowsToRecords property is greater than zero.

The Record parameter indicates the location of the first added record, and the Count parameter indicates the number of records being added.

The Cause parameter is the name of what caused the new record(s) to be added. It can have one of the following values:

ValueDescription
DownThe user used the down arrow
EnterThe user used the ENTER key
TabThe user used the TAB key
GotFocusThe record was added when the table received focus (See BlankRowManagement)

Using the Cancel property to cancel the event only works if the event was qualified synchronously.

See Also

AfterNewRecordsBeforeDeleteRecordsBeforeUpdateNewRowCountRowsToRecordsBlankRowManagement

  • No labels