canDelete example
The following event handler copies the row that is about to be deleted to a separate archive table that is opened in another query in the form.
function Rowset_canDelete
local n, rArchive
rArchive = this.parent.parent.archive1.rowset
rArchive.beginAppend( )
for n = 1 to this.fields.size
rArchive.fields[ n ].value = this.fields[ n ].value
endfor
rArchive.save( )
return true
This canDelete event handler always returns true after making the copy so that the row is deleted.