ADO » Recordset » Update

Boolean = recordsetobject.Update (Fields, Values)
The optional Fields parameter is a variant that is either a single field name, or an array of field names or ordinal positions, that you want to update.
The optional Values parameter is a variant that is a value or array of values for the field or array of fields that you wish to update.

Used 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.


If MsgBox("Save All Changes", vbYesNo) = vbYes Then
   MsgBox "All Changes Updated"
   MsgBox "Update Cancelled"
End If

See Also: