Dick7Access
Dick S
- Local time
- Yesterday, 23:47
- Joined
- Jun 9, 2009
- Messages
- 4,273
I know I can use Ctrl Z.
Is it possible to put a Undo typing Command button, on a Access form
Is it possible to put a Undo typing Command button, on a Access form
Yes, I believe it does.There's Me.Undo, but I think that undirties the entire form - all fields. (if I remember right?)
Possibly what you are saying, + a little coding with a global variable for the 'current' (or 'last') control name? Plus some SetFocus and ControlName.Undo actions?Some controls - but not all of them, apparently - allow ctrlname.Undo - but the trick would be how to specify it, because in order to have another control, call it AUndo, to undo typing in a control named A, you would have to click AUndo - which means focus would now be in AUndo, not in A. And that means that AUndo.Click event would have to name the control A specifically. So it may be impossible to have ONE control that undoes the last control regardless of what it was. You MIGHT be able to do one button per control - like AUndo, BUndo, CUndo, etc. to undo typing in A, B, C, etc. - which would become burdensome very fast if you had a LOT of controls.
With CTRL/Z, at least you don't change focus. And with Me.Undo, focus doesn't matter as long as it is somewhere on the form.
Sometimes my eyes are almost popping out, haha. "How on earth did you manage to do this...?!"
Thank you for reminding me.The first half is "That which CAN go wrong WILL go wrong." The part that everyone forgets is "Therefore, make it so it can't go wrong."
Do you meant the Esc key?I'm curious. Access has a command to do what you want. Why do you want to build your own?
@Dick7Access,Hi Pat. I knew you would be the one to ask that. <G> The adaption of my Calendar DB has a form made by my tech in Venezuela with some other language than access, and Ctrl Z doesn't work. On top of that I have neuropathy in both hands and sometimes trying to copy with Ctrl C my finger doesn’t hold down Ctrl and I lose my data.
is my esc the same as excThe exc key backs out changes for the active control. hitting the esc key twice clears thw whole record.