Filter on recordref

Hi, Does anybody know how to set a filter on a recordref!, I know its probably a simple question, I just cant find any examples of this. Thank you all for putting up with my stupidity!

You need to create a fieldref and set filters on it <RecordRefVar>.OPEN(<TableNo>); <FieldRefVari> := <RecordRefVar>.FIELD(<FieldNo>); <FieldRefVar>.SETRANGE(<FromValue>, <ToValue>); <FieldRefVar>.SETFILTER(<String>[, <Value>], ...); IF <RecordRefVar>.FIND('-') THEN REPEAT ... UNTIL <RecordRefVar>.NEXT = 0; <RecordRefVar>.CLOSE; Hope this helps