With Thisform lcAlias = ALIAS() Select JNYSTAGE lcFilter = "OPERATOR = " + STR( .nOperator, 3, 0) + ; " and ROUTE = '" + .cRoute + "'" + ; " and MCL_RTE = '" + .cMCL_Rte + "'" Set Filter To &lcFilter Locate With .pgfMainPageFrame.Page3 With .grdJnyStage .Column1.chkCheck1.Value = IIF( JOURNEY = "Y", .T., .F.) .Column4.chkCheck1.Value = IIF( STAGE = "Y", .T., .F.) .Column7.chkCheck1.Value = IIF( MON = "Y", .T., .F.) ... tue, wed, thu, etc. ...and, after edit, HOPE to save it as follows:
If sysCONFIRM( "Save changes to Journey Stages Table?", ; "Confirm Save Changes") Select JNYSTAGE Locate If not RLOCK() = sysWARNINGMESSAGE( "Sorry. Unable to update the Journey Stages Table." + CHR(13) + ; "Another User has the table open for edit.", ; "Cannot Update Journey Stages") Else With this.Parent With .grdJnyStage Replace JOURNEY with IIF( .Column1.chkCheck1.Value, "Y", "N") Replace STAGE with IIF( .Column4.chkCheck1.Value, "Y", "N") Replace MON with IIF( .Column7.chkCheck1.Value, "Y", "N") ... tue, wed, thu, etc. .Refresh() EndWith = TABLEUPDATE( .T.) UNLOCK EndIf EndIfTrouble is: All recs in the grid get saved in the same permutation of checks as the 1st record and don't necessarily follow the underllying data. I've tried putting the Replaces in a scan-endscan, but what happened then was the children of the parent rec 3 got copied to those of parent rec 5, and removed from those of parent rec 3, and then only the top rec (out of 2 in this case).