>>>LOCAL nOldRec,lnPos,lcOrder,lcColor >>>nOldRec = recno() >>>store 0 to lnPos >>>store "" to lcOrder, lcColor >>>* get current text color >>>WITH This >>> lcColor = .ForeColor >>> IF lcColor = RGB(128,0,128) && purple color 8388736 >>> lcColor = RGB(0,0,0) && black color 0 >>> SET ORDER TO >>> ELSE >>> WITH .Parent >>> * tag is the field name - get from column controlsource >>> lnPos=RAT('.',.ControlSource) >>> lcOrder=SUBSTR(.ControlSource,lnPos+1) >>> IF tagno(lcOrder)>0 >>> SET ORDER TO (lcOrder) >>> ENDIF >>> lcColor = RGB(128,0,128) && purple color >>> .Parent.clmPmtType.hdrPmtType.ForeColor = rgb(0,0,0) >>> .Parent.clmElement.hdrElement.ForeColor = rgb(0,0,0) >>> .Parent.clmAgency.hdrAgency.ForeColor = RGB(0,0,0) >>> ENDWITH >>> ENDIF >>> LOCATE >>> .ForeColor = lcColor >>> .Refresh() >>> .parent.setfocus >>> goto nOldRec >>>ENDWITH >>>