Each line item in my subform has a Commit Button, and an Undo Button.
Once the user starts making changes, I want to force them to use one of those two buttones.
If they accidientally try to leave the subform by clicking at a higher level, or by closing the main form, or even by closing access, I want to display a message:
"you must either commit or undo your change, before proceeding".
But, they should be able to freely enter and leave the subform for nonupdate purposes (like copying text to the clipboard)
-------------- here is the background -----------
My form is structured as follows
Level 1 frmOrderHdr < allows user to select the Order Number
Level 2 sfrmOrderDetail has these controls:
fldOrderCurrTotal which has the following Control Source
=DLookUp("CurrTotal","[qryOrderTotal]","OrderNumber = " & [fldOrderNumber])
Level 3 sfrmOrderLines contains
btnCommit onclick is <me.dirty = false:me.requery>
btnUndo onclick is <me.undo:me.requery>
fldLineNumber fldPartNumber Qty Dollar
01 Nuts 5 $30
02 Bolts 5 $20