* frmGridTest.grdInqPost.BeforeRowColChange >LPARAMETERS nColIndex >LOCAL CtrlName >WITH THIS > IF NOT EMPTY(.Columns(nColIndex).DynamicCurrentControl) > CtrlName = EVALUATE( .Columns(nColIndex).DynamicCurrentControl ) > ELSE > CtrlName = .Columns(nColIndex).CurrentControl > ENDIF > IF EVALUATE(".Columns(nColIndex)." + m.CtrlName + ".Value") ; > != OLDVAL( .Columns(nColIndex).ControlSource ) > WITH THISFORM > .cmdSave.Enabled = .T. > .cmdClose.Cancel = .F. > .cmdCancel.Enabled = .T. > .cmdCancel.Cancel = .T. > ENDWITH > ENDIF >ENDWITH>Seems like, if I only have one control in each column, I could skip the part which checks whether to use DynamicCurrentControl or just CurrentControl. I'll play around with that and see what I can get to work. I think my problem with original code is just that I should have used EVAL(.Columns(nColIndex).CurrentControl + ".Value") on the left side of my comparison. I was leaving out the EVAL().
IF EVALUATE(".Columns(nColIndex)." + m.CtrlName + ".Value") ; != OLDVAL( .Columns(nColIndex).ControlSource )part seems to fail. Strange maybe but you need a .value = .value first.