On a single form, yes:
Private Sub cmdBlankItAll_Click()
Me.Undo
End Sub
With a subform... MUCH harder. The problem is that the instant you set focus
to any subform control, the main form record is written to disk. It can no
longer be undone. On the Subform, whenever you move to another record, or back
to the main form, that subform record is written to disk. It's already SAVED -
you can't easily decide "oh I didn't mean it".
What you will need to do is execute a Delete query to delete the mainform
record; if you have Cascade Deletes set on the relationship between the two
tables this will delete the child records. If not, you'll need two delete
queries, one for the subform's table, one for the mainform.
The dilemma is that in a multiuser system you can't be sure that some OTHER
user hasn't made use of the data already written to disk.
John W. Vinson [MVP]
John...
I tried running your version of the undo, as well as the MS version
of undo, and nothing. With MS's version, I get "Cannot Undo Record" or
whatever the error message is.. With yours, I get nothing...
The problem is, the record entry is already there. It already
exists, and so nothing is being typed in right now, at this time.
The MS version of Delete Record is more of what I am looking for,
although the only problem, is it actally erases the whole entire
record entry from the table. What I need to do, is just goto 4 or 5
boxes in that record and erase the information I see when I pull up
that specific record.
It seems to look like what I am looking for just can't be done,
which is fine if that's the case...