LOCAL lRet, oColumn, cControlsource, nCol, oActiveControl, cView, cAliases, cAlias, nT IF THISFORM.Visible AND USED(THIS.RecordSource) ** Checking if the DefaultAlias has been changed lRet = NVL(!EMPTY(THIS.RecordSource) AND !EOF(THIS.RecordSource) AND ; GETFLDSTATE(-1,THIS.RecordSource) != REPLICATE("1",FCOUNT(THIS.RecordSource)+1), .F.) ** Checking the currently active control oActiveControl = .NULL. DO CASE CASE TYPE("THISFORM.ActiveControl.ControlSource")="C" ** The control has an controlSource oActiveControl = THISFORM.ActiveControl CASE TYPE("THISFORM.ActiveControl.Recordsource") = "C" ** The current control is a grid. So get the current control in the grid nCol = THISFORM.ActiveControl.ActiveColumn FOR EACH oColumn IN THISFORM.ActiveControl.Columns IF oColumn.ColumnOrder = nCol AND TYPE("oColumn."+oColumn.currentcontrol+".Name")="C" oActiveControl = EVAL("oColumn."+oColumn.currentcontrol) EXIT ENDIF ENDFOR ENDCASE IF !ISNULL(oActiveControl) AND TYPE("oActiveControl.ControlSource")="C" AND !EMPTY(oActiveControl.ControlSource) ** So there is an active control, either in a grid or on the form or in some other container. cControlSource = oActiveControl.ControlSource cAlias = UPPER(JUSTSTEM(cControlSource)) ** Check if the controlsource is refering to a table which is to be checked. IF cAlias == UPPER(THIS.RecordSource) lRet = lRet OR (TYPE(cControlsource) == TYPE("oActiveControl.Value") AND ; EVAL(cControlSource) <> oActiveControl.Value) ENDIF ENDIF ENDIF RETURN NVL(lRet, .F.)>What is the best way to verify that a user entered something into a 2 column grid before doing tableupdate.