FUNCTION AddRuleToCursor( pcCursorObject ) LOCAL lcRuleName as String, lcRuleObject as String lcRuleName = 'rule' + ALLTRIM( pcCursorObject.cSource ) lcRuleObjectName = 'oRule' + ALLTRIM( pcCursorObject.cSource ) If Not Pemstatus(pcCursorObject, lcRuleName , 5) With pcCursorObject .AddNewObject( lcRuleObjectName , lcRuleName ) FOR EACH loObject IN pcCursorObject.Controls IF loObject.Name = UPPER( lcRuleObjectName ) .AddRule( loObject ) ENDIF ENDFOR Endwith EndifI'm having difficulty figuring out how to get the oRule object reference