Acc 2007: Me.Undo Not Working

B

bh

I have form with the following command button:

Private Sub cmdCancel_Click()
Me.Undo
End Sub

If I put a break point on this procedure & click the button in on the form,
it shows the undo statement being executed, however, the form is still
dirty. Any ideas what could be causing this? It has always worked on other
forms in the past. Thanks in advance.

bh
 
T

Tom van Stiphout

On Tue, 4 Mar 2008 08:16:49 -0500, "bh" <[email protected]>
wrote:

Perhaps you have some other code that makes it dirty again?
For example in Form_Current code like Me.SomeControl = SomeValue
Put a breakpoint in each event procedure, and repeat the test.

-Tom.
 
B

bh

No suck luck. I have no on current procedure, as this is an unbound form.
I've even tried commenting out the entire form code, with the exception of
that procedure, and it still doesn't want to work. It's the strangest
thing.
 
D

Dirk Goldgar

bh said:
No suck luck. I have no on current procedure, as this is an unbound form.

The Undo method has no effect on unbound forms. It is intended to undo
changes to a form's current record, but an unbound form has no current
record.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top