lParam toObj do case case pemstatus(toObj,"Tag",5) and toObj.Tag="X" {do what you need with it} case inlist(toObj.Class,"Pageframe","Page","Grid", ; "Commandgroup","Optiongroup","Form","Toolbar", "Container") for each loObj in toObj.controls this.RecurseForTagX(loObj) endfor endcaseIf you're using VFP6, then you'd have to have the second case broken down for button groups (which didn't have .controls, but only .buttons back then), pageframes (.pages), grids (.columns), and I think the rest would go as having .controls collection.