Clears the copy buffer in preparation for creating a new record in a Table or Dynaset .
The AddNew method uses these parts:
recordset The Recordset property of a data control; in the Professional Edition, can be an object variable that identifies a Table or Dynaset. If recordset does not exist or is not open, an error occurs.
The AddNew method sets all fields in the copy buffer to Null After putting data in the record, use the Update method to add the record to the recordset. If you add a record to a Table, the record does not immediately appear in any currently existing Dynaset based on that Table. If you add a record to a Dynaset, however, the record immediately appears in the underlying Table. and makes it the current record .
While already editing a new record, using AddNew again clears any changes made to fields in the copy buffer since the last AddNew. With a data control, if an Edit or AddNew operation is pending when you use one of the Find or Move methods or close the recordset, Update is automatically invoked if not stopped during the Validate event.
The new record's apparent position in the recordset depends on whether you add new records to a Table or a Dynaset. If you add a new record to a Table, the new record appears in its position in the table according to the current index. If you add a new record to a Dynaset, the new record appears at the end of the Dynaset.
When you use the Update method after AddNew, the record that was current before you executed AddNew becomes the current record again, and the new record is added to the recordset. To make the new record current after you use Update:
Set the Bookmark equal to the LastModified property.
Use MoveLast with a Dynaset or a Table that does not have an index.
In the Professional Edition, use Seek with a Table that has an index.
Caution In the Professional Edition, if you are not using a data control and use one of the Find or Move methods or close the recordset while an Edit or AddNew operation is pending, any existing changes will be lost and no error will occur.
In a multiuser environment with the recordset's LockEdits property set to True, using Edit or AddNew locks the page If the LockEdits property is False, the page is not locked until the actual Update operation. until after Update has completed the updating process.