Edit Method

See AlsolanEditSee                 Example lanEditEx>Low

Description

Opens the current record1BNJB8X in a specified recordset22S7WAF for editing by copying it to the copy bufferKBPE86.

Syntax

recordset.Edit

Remarks

The Edit method uses these parts:

Part                 Description

 

recordset          The Recordset property of a data control.  In the Professional Edition, can also be an object variableZ3R9Q5 identifying a Table or Dynaset.

 

Use the Edit method to allow changes to the current record and to lock the current pageAP754UT with pessimistic4CZD0Q2 locking to prevent changes by other users.  After the user has changed the record, use the Update method to save changes.  Using Edit a second time without using Update will undo any changes made to the record in the copy buffer.

In a multiuser environment with the recordset's LockEdits property set to True, using Edit or AddNew locks the page until after Update has completed the updating process.  If the LockEdits property is False, the page is not locked until the actual Update operation.

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 current record remains current after an Edit operation.

 

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.

 

Using Edit will produce an error in the following conditions:

         There is no current record.

         The database or recordset is read-only.

         No fields in the record are updatable.

         The database or recordset was opened for exclusive use by another user.