SIMPOL Documentation

Controlling with Events

It will usually be as a result of your program code calling the dataform1 methods: selectfirst(), selectlast(), selectnext(), selectprevious(), etc., that will result in data changing on the form. The onselect event can be assigned a handler so that you can run some code each time a record is selected. This can be used to implement calculated form content based on the value of the underlying record. The onsave event can be handled to implement validations and calculations before the record is saved, or to refuse to save if the validation fails. In the same way, the onnewrecord event can be used to implement default values for the new record, and the ondiscard event can be used to do cleanup if the user chooses not to save a record.