>Richard ---
>
>I think you have to put some code *before* requery that checks for changed/new records and asks the user if they want to discard or save the changes. You can do this by setting a From.Property (whatever you want to call it) True via the InterActive change event of the controls in the Grid. Before requery, ehck for that True and prompt the user (Save/Discard)....then reset the property to false....of course, this is generic advice.
>
>Uncommitted changes cause all sorts of problems.....
You could spin through all the fields in the table and look for a difference between CURVAL() and OLDVAL()
SELECT xxx
tchanged = .F.
FOR t = 1 TO FIELDS()
IF CURVAL(FIELD(m.t)) # OLDVAL(FIELD(m.t))
tchanged = .T.
EXIT
ENDIF
ENDFOR
answer = MESSAGEBOX("You have unposted changes. Post?" , 4+32+256, "Post changes?")
IF m.answer = 6
TABLEUPATE(.T., .T.)
ELSE
TABLEREVERT(.T.)
ENDIF