Syntax
| Boolean = recordsetobject.Update [(Fields, Values)]
| ||||||
---|---|---|---|---|---|---|---|
Description
| Use to save any changes made to the current row of a Recordset object.
The Update method is called to save all changes you have made to the current Record to both the Recordset object and the data source. Clearly, both the Recordset object and the data source must support updates.
If you have made changes to a record and then move to another record, the Update method is implicitly called and the record is saved. After a call to this method is completed, the current record pointer will still point to the same current record.
The Update method is used to save a single record. The UpdateBatch method is called to save multiple records. (If the Recordset object supports batch updating, the new and changed records will be locally cached until you call the UpdateBatch method.)
There are two optional parameters.
| ||||||
See Also
| |||||||
Example
| If MsgBox("Save All Changes", vbYesNo) = vbYes Then
objRecordset.Update
MsgBox "All Changes Updated"
Else
objRecordset.CancelUpdate
MsgBox "Update Cancelled"
End If
|