Event BeforeDelete()
Description
Event that is fired just before a record is deleted. Event returns a boolean (true or false). Set the boolean to true to prevent the record from being deleted. The default value of the boolean is False.
Code Snippet
Function BeforeDelete
Rem Deleting a record has the following program flow:
Rem 1. The data entry form asks the user for permission to delete the record(s)
RemIf permission is granted, the flow wil continue. If it is denied
Remthe delete will be aborted.
Rem 2. This script-function is called. If the result of the function is TRUE,
Remthe flow wil continue.
RemIf it is FALSE, the delete operation will be aborted, without a
Remmessage to the user (so make sure to do it yourself in the script-function)
Rem 3. Finally the program checks if the record can be
Remdeleted by using business logic inside the data entry form, so this
Remcan still result in the abortion of the delete
Rem 4. The database server is given the command to delete the record
MsgBox
"BeforeDelete
"
BeforeDelete = True
End Function