I think perhaps one of the times Undo is available, is when the form is dirty - i e, it has unsaved changes.
You could try the following test/action in stead
If Me.Dirty then Me.Undo
But, what do you do if the record is already saved? The acSaveNo thingie of the DoCmd.Close method, is only...