Shinare
SEXNOCULAR
Joined: 17 Mar 2004
Posts: 13332
Location: Up your butt with a coconut!!
|
MS Access: Undo changes made to a subform
|
|
OK, I know this doesn't seem like the place to be posting this, in a gamer forum and all. But I really don't feel like making an account on an MS Access forum just to post something interesting.
Anyway, onto the problem and solution.
Problem:
I have a subform that is a filtered datasheet view that someone can edit. Unfortunately, its not easy enough for the end user to press the "undo" command on the toolbar to undo changes they've made to the record in the subform. They wanted a BIG button on the form that will undo changes made to the record in the subform. I searched the interweb and everyone says "You cant!" but I figured out a way that you can.
Solution:
Main form:
Create a command button "Undo Change" and onClick Me!SubFormName.SetFocus then DoCmd.RunCommand acCmdUndo
(I also use the OnDirty event on the subform controls to hide/unhide the undo button so its only visible when needed)
You cant use Me.Undo, which everyone was (correctly) saying you can not do. But if you pull out the old school acCmdUndo command, it works! Yay for being old!!! _________________ For with what measure you measure it will be measured to you.
|