LOCAL lcLastActiveControlName, lcMyMacroSubst lcLastActiveControlName=Thisform.cLastFocus IF NOT EMPTY(lcLastActiveControlName) lcMyMacroSubst ="Thisform." + lcLastActiveControlName+".SetFocus" &lcMyMacroSubst ENDIFActually I had it from earlier but lost the notes