Adding a New Record

To add a new record, use the AddNew method of the Recordset object. Use the Update method if you are not going to add any more records. It is not necessary to call the Update method if you are moving to the next record. Calling the Move method implicitly calls the Update method before moving to the new record. For example, look at the following statements:

rst!LastName = "Smith" rst.MoveNext

In the code fragment above, the Update method is automatically called when you move to the next record.

The procedure in Hands-On 14-1 demonstrates how to add a new record to the specified table.

0 0

Post a comment