Cancelling deletes using BeforeDelete

Cancelling deletes using BeforeDelete

Postby chuckbeasley » Wed 21 Dec 2005 17:31

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?


Postby GEswin » Wed 21 Dec 2005 17:55

Simply call

Code: Select all

and the delete will be cancelled.
Posts: 186
Joined: Wed 03 Nov 2004 16:57
Location: Spain

Postby chuckbeasley » Wed 21 Dec 2005 17:57

Thanks! That fixed it.

Return to MySQL Data Access Components