>Make the corntolsource for the checkbox be the DELETED() function. In the click event add this code;
Thank you both Jim and Naomi. I am still not sure how to make the control source the deleted() function. Tried putting the word "deleted()" in the control source, but it does not accept it.
However I got it to work well with the following code:
First Jim's code in the Click event of the checkbox:
IF DELETED()
RECALL
ELSE
DELETE
ENDIF
this.refresh
But this on it's own leaves the checkbox ticked for all records, or unticked for all records.
Therefore added some similar code in the Refresh method of the checkbox as suggested by Naomi.
IF DELETED()
this.Value = 1
ELSE
this.Value = 0
ENDIF
This keeps the checkbox ticks in sync with the deleted records.
Thank you both for your help. This has been a great help. (Could not find anything on this subject when searching the UT.)
regards
David Wheeldon