I had a similar need for the user changing a primary key when editing in a grid. Here is what I did.
In the gotfocus of the grid cell, I put the contents in the TAG. Then in the Valid, I compare the displayvalue with the tag and then made the changes to the data in the child table. But you could just as well change it back if it was edited. Idid it this way so I could implement some security levels on the data.
Ron Seidl
Independent Developer
VFP
"I'm playing in life's theater in anticipation of a great cast party!"