LOCAL m_activecoll local lnColor, cfld m_activecoll = thisform.GrdInvRes.ActiveColumn cfld = EVALUATE("xtabresult."+FIELD(m_activecoll,"xtabresult")) && Change the name of the cursor (xtabresult) if you need do case case cfld = 'NEG' lnColor = rgb( 255, 0, 0 ) case cfld $ 'POS AFF' lnColor = rgb( 0, 255, 0 ) otherwise lnColor = rgb( 0, 0, 0 ) endcase return lnColor