Re: developer 2000 key-delrec
Date: 05 Apr 2000 04:40:47 GMT
Message-ID: <20000405004047.20220.00000880_at_ng-fz1.aol.com>
>I have a form that is based on a table that has two fields in it (id,
>name). One field (id) of that table is based on a database sequence
>(it gets created as you add data to the other field). We are not
>showing the sequence field on the form.
>I have key-delrec on the the block that has code that checks for any
>child records . (The sequence key field (ID) is a foreign key in
>another table, we check for child records based on the sequence key
>field. The “name field is not referenced in any other table).
>
>My question is:
>Although I do have a key-delrec to stop the deletion of a “record”, but
>I am being able to delete the ‘name’ field. I don’t want user to be
>able to delete the ‘name’ field if the id related to it has child
>records.
>
To prevent the user from deleting the record or clearing the field, and provide instant checking, put the code on the when-validate-item trigger for the item and the when-validate-row trigger for the block. If you put it on the pre-delete, it will be checked only when the user attempts to save their changes.
Dan Hekimian-Williams Received on Wed Apr 05 2000 - 06:40:47 CEST