Use a Delete button in combination with a Save and Clear button. A delete operation should clear the window after the user deletes a record, but should not close the window. The operation should clear the window, then place the focus on the first field in the tab sequence.
The following example displays an ask() message, allowing the user to cancel the delete operation. If the user chooses to delete, the record is removed, along with its corresponding note record using the Delete_Record_Note procedure:
if ask("Delete this lead record?", "Delete", "Cancel", "") = ASKBUTTON1 then remove table IG_Leads_MSTR; if err() = OKAY then call Delete_Record_Note, 'Note Index'; restart form; elseif err() = LOCKED then warning "This lead record is already locked. Changes won't be saved."; else restart form; end if; end if;