This one has me going nuts for a few hours now.
I have a form with some calculated textboxes, each based on what was entered in another textbox.
If the user does an esc or ctrl-z, it undoes the last change.
The value in the associated calculated textbox needs to be recalculated to return the value of the old, restored data.
I tried the textbox control On Undo event, but here I have two problems:
1. The undo procedure doesn't always run for all the text boxes. I've tested it over and over, and I don't see why it runs for one textbox and not another with an undo. The DB is too big to post here, but I've got breakpoints in the procedure, could make a video I suppose, but I doubt anyone would want to watch it without the code. Has anyone seen this problem?
2. I want to recalculate for the affected control, but in the undo, when it runs, it has the value for the control before the undo. I can't find a procedure to use after the undo, that would have the restored value of the textbox to use for the recalculate. The Form_Undo has the same problem of not having the old values restored.
The old value might be stored somewhere to use in the Undo, but then I would have to rewrite all the calculating routines to use either the current value or old value, a rather stupid exercise. I would rather find a way to use the current, restored value.