CREATE SQL VIEW vwFormAlinks AS SELECT forms.* FROM forms WHERE start_field = ?lcFormName CREATE SQL VIEW vwPaths AS SELECT forms.* FROM forms WHERE start_field = ?vwFormAlinks.end_field *!* PROGRAM GLOBAL glTarget && This is not an endorsement of global variables by the way < bg>...it's just an expedient. How you do this will depend a bit on your goals. glTarget = 'FormG' && or whatever USE vwPaths IN 0 NODATA USE vwFormAlinks IN 0 NODATA IF TransversePath( 'FormA' ) && The name of the top level form *!* We found a valid path to the target from every path that branches from this form. ELSE *!* We had an unsuccessful path. What do we do with this info? < s> ENDIF FUNCTION TransversePath LPARAMETER tcFormName LOCAL lcFormName, llSuccess lcFormName = tcFormName REQUERY( 'vwFormAlinks' ) REQUERY( 'vwPaths' ) SELECT vwFormAlinks SCAN *!* Check to see if it is a valid path. IF EVAL( vwFormAlinks.Conditional ) !* Check to see if we've found the goal form. IF vwFormAlinks.End_field = glTarget RETURN .T. ELSE *!* We need to keep looking RETURN TransversePath( vwFormAlinks.End_Field ) ENDIF ENDIF ENDSCANTHERE'S A REALLY BIG FLAW in the above idea! :-) You've noticed that the cursor's are getting changed all over the place. I like the idea of using p-views here, but I don't know if it will be workable, since you'll need to keep resetting the data after the recursion starts popping up.