You can highlight a set of records on a subform and programmatically access these records with the HIGHLIGHT RECORDS command. Note: the HIGHLIGHT RECORDS command does nothing if the Selection Mode property Multiple is not selected for the subform.
The Highlight Records command allows you to highlight records in list form. The records you selected will be highlighted but the current selection will not be modified. You can use this command in a subform as well but you have to make Selection Mode property of the subform to Multiple. If you have it set to Single, you can use the GOTO SELECTED RECORD command to highlight a line in the subform. Below is an example code that puts the selection in the subform into an array, finds a certain record, gets the record number, and then uses the GOTO SELECTED RECORD command to highlight the record in the subform. The current selection in the subform is not changed.
ARRAY TEXT(atDegree;0)
C_INTEGER(Num1)
SELECTION TO ARRAY([Table 2]Degree;atDegree)
Num1:=Find in array(atDegree;"Math")
If (Num1>0)
GOTO SELECTED RECORD([Table 2];Num1)
End if