WITH thisform.currentgrid .AddColumn(nColIndex) IF !EMPTY(cControl) .Columns(nColIndex).AddObject('my'+cControl, cControl) .Columns(nColIndex).Sparse = .F. IF !EMPTY(cDynamicControl) .Columns(nColIndex).DynamicCurrentControl = cDynamicControl ELSE .Columns(nColIndex).CurrentControl = 'my'+cControl ENDIF ENDIF .Columns(nColIndex).ControlSource = cField .Columns(nColIndex).Width = (( FONTMETRIC(6, 'Arial', 9) + 2) * iWidth ) *---Remove default header and create a custom header so when can get to the header.click event. .Columns(nColIndex).RemoveObject('Header1') .Columns(nColIndex).NewObject('custHeader1', 'custHeader', 'custHeader.prg') .Columns(nColIndex).custHeader1.caption = cHeading IF !EMPTY(cMask) .Columns(nColIndex).Format = cMask ENDIF .Columns(nColIndex).Visible = .T. .Columns(nColIndex).ReadOnly = .F. .Columns(nColIndex).Text1.ReadOnly = .F. .Columns(nColIndex).Text1.Visible = .T. **---->>>> Below here is the problem code everything else in this method runs fine IF PEMSTATUS(thisform,'setpolicygridcolor',5) && this returns .t. * .recordsource = 'TPOLICY' which is correct * cField = "PO_STATUS" which is also correct and all of the code * above this section has worked for months and is working * In this case nColIndex = 1 (the first column in the grid) colorvalue = thisform.setpolicygridcolor(.recordsource,cField) * Setpolicygridcolor returns the color value * I have tried returning RGB(255,255,255) and 167725 and both return the error * In some cases I want to return something such as: * "thisform.SetStatcolor('policies')" * but I haven't gotten that far in testing yet due to the default return value * of RGB(255,255,255) and 1677725 erroring in my initial tests .Columns(nColIndex).dynamicbackcolor = colorvalue ENDIF **---->>>> Above here is the problem code ENDWITH