PROCEDURE SpinTroughObjects LPARAMETER oObject LOCAL oSPinObject, oPage FOR EACH oSPinObject IN oObject.Controls DO CASE CASE oSPinObject.BASECLASS="Container" THISFORM.SpinTroughObjects(oSPinObject) CASE oSPinObject.BASECLASS="Pageframe" FOR EACH oPage IN oSpingObject.Pages THISFORM.SpinTroughObjects(oPage) ENDFOR OTHERWISE DO SomeAction ENDCASE ENDFOR RETURNThis code shoud be paced in a method on the form and can be called recursevely in case you also want to spin trough the controls in a container or pageframe.