Printable Version of Topic

Click here to view this topic in its original format

UtterAccess Forums _ Access Records _ Trying To Edit Number Of Undo Items In Stack Access 2007

Posted by: bcmarshall Mar 5 2019, 07:11 PM

Hello all -

I've been trying to edit the number of undo events saved in an Access record and I can't find a thing. It's very interesting that I can Google the question and come up with fixes for Excel and PowerPoint, but I can't find a peep about Access and those fixes don't seem to relate.

Does anyone know how to control how many undo steps are saved?

I always appreciate the efforts of people here.

Posted by: JeffK Mar 29 2019, 07:00 AM

If you're wanting to limit the number of times a user can undo their typing, you can try setting the Cancel argument of the form's Form_Undo event under certain conditions, such as in response to your own counter variable.

If you need to control the undo levels in design view, have a look at these two hidden methods of the Application object:


I've used BeginUndoable a bit when building add-ins for developers. Normally if you use a custom designer to set form properties in design view with VBA, Access doesn't count that as an undoable design action. You have to force it to by calling Application.BeginUndoable before setting the properties with VBA. If you investigate this route, also note that this will only work if you set the WizHook key first.

I haven't used SetUndoRecording before, so no tips there. Just something to investigate. As always, take care with hidden methods and WizHook manipulation. No guarantees they will be supported in the future, etc.