Visual Basic: DataGrid Control
Returns or sets a value indicating whether the user can add new records to the Recordset object underlying a DataGrid control.
object.AllowAddNew [= value]
The AllowAddNew property syntax has these parts:
|object||An object expression that evaluates to an object in the Applies To list.|
|value||A Boolean expression that determines whether a user can add new records, as described in Settings.|
The settings for value are:
|True||Users can add records to the Recordset object underlying the DataGrid control.|
|False||Users can't add records to the Recordset underlying the DataGrid control.|
If the AllowAddnew property is True, the last row displayed in the DataGrid control is left blank to permit users to enter new records. If the AllowAddNew property is False, no blank line is displayed.
The underlying Recordset may not enable insertions even if the AllowAddNew property is True. In this case, an error occurs when the user tries to add a record.