Page 1 of 1

Cancelling deletes using BeforeDelete

Posted: Wed 21 Dec 2005 17:31
by chuckbeasley
I'm attempting to cancel a delete using Application.MessageBox displayed during the TMyTable.BeforeDelete event. If the user decides not to delete the record (IDNO), I'm issuing the TMyTable.Cancel event. However, the record is still being deleted. Why? Is there any other way to abort the delete?

Thanks

Posted: Wed 21 Dec 2005 17:55
by GEswin
Simply call

Code: Select all

 Abort;
and the delete will be cancelled.

Posted: Wed 21 Dec 2005 17:57
by chuckbeasley
Thanks! That fixed it.