Visual InterDev

onbeforeupdate Event

See Also            Applies To

Occurs before a record is updated when updating a record.

Syntax

objRS_onbeforeupdate

Parameters

object

A script object.

Remarks

The onbeforeupdate event fires after the UpdateRecord method has been called, but before the actual update occurs  on the Recordset script object. You may use this function to validate data before updating.

Example

sub myRS_onbeforeupdate()
   if trim(myRs.fields.getValue("FirstName")) = "" then
      Label.setCaption("First Name is a required field.")
      myRs.CancelUpdate()
   end if
end sub