>hi everybody > >how can i programaticly find out the 'nRelationshipNumber' for the Target command (Vfp6)? i know the parent alias and the child alias. > >thanks in advance your help.
Loop through targets till you find the child alias. ie:
For ix=1To 1000 && 1000 is crazy highIf ( Target(ix,lcParent) == Upper(lcChild) Or Empty(Target(ix,lcParent)) )
ExitEndifEndforIf ( !Empty(Target(ix,lcParent)) )
? ix,TARGET(ix,lcParent),RELATION(ix,lcParent)
Else
? 'No relation'Endif