Paullkha
asked on
me.undo
I have a control on a form entitled Undo Changes. This control is disabled until this event is fired:
Private Sub Form_Dirty(Cancel As Integer)
Me.cmdUndo.Enabled = True
End Sub
The cmd button executes the following code:
me.undo
After executing this code, the cmd button should be disabled once again.
Where do I put this code?
Me.cmdUndo.Enabled = True
Private Sub Form_Dirty(Cancel As Integer)
Me.cmdUndo.Enabled = True
End Sub
The cmd button executes the following code:
me.undo
After executing this code, the cmd button should be disabled once again.
Where do I put this code?
Me.cmdUndo.Enabled = True
ASKER
True. But in most applications, the behavior is undo button disabled until one has changed the doc. If one hits undo, the doc is cleaned and the undo button is again disabled. Trying to mimick this behavior but can not see how.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Focus?
damn, it works, didn't think I could do that.
damn, it works, didn't think I could do that.
I normally code an [Undo] button like:
If me.dirty then
me.undo
endif
and have it always enabled.
The user will know when he "screw up" the form...
Nic;o)