I created 2 new form fields and they can not be empty.
so in Form - OnQueryCloseForm() : Boolean create a condition
IF ((“x” = 0T) OR (“z” = 0D)) AND (y=FALSE) THEN BEGIN
But, this is bot the best solution, because if a user, for mistake, executes this form the message appears, and is not ok.
I tried this cindition in Form - OnModifyRecord() : Boolean, but thoes not work correctly.