In article <erd2k0$ljl$1 (AT) mouse (DOT) otenet.gr>, "Hatzigiannakis Nikos"
<ypai (AT) aigaio (DOT) gr> wrote:
Quote:
How can I prevent the deletion of a record if it has related records in
FM8.5 pro?
In FM6.0 I used the isvalid(othertable::field) function to determin the
existance of related records. This doesnt seam to work in 8.5. Any
sugestions? |
You can Count the related records instead.
ie.
If [Count(Relationship::KeyField) = 0]
Delete Record []
Else
Message ["Can not delete - has related records"]
End If
where KeyField is the same field used to make the Relationship link
work. Using this field means it must ALWAYS have data in it and
therefore will be counted, whereas using another related field that may
be empty gives an inaccurate count.
Helpful Harry
Hopefully helping harassed humans happily handle handiwork hardships ;o)