L
ll
Hi,
I have added an Undo Changes button to my Access form, and I would
like to somehow disable it after each click and re-enable it when a
change is made to the form. Currently, I have the following code.
Thanks for any help you might be able to give.
Regards,
Louis
==============================
Private Sub Form_Current()
Me!cmdUndoChanges.Enabled = False
End Sub
Private Sub Form_Dirty(Cancel As Integer)
Me!cmdUndoChanges.Enabled = True
End Sub
Private Sub cmdUndoChanges_Click()
On Error GoTo Err_undoChanges_Click
DoCmd.RunCommand acCmdUndo
Exit_undoChanges_Click:
Exit Sub
Err_undoChanges_Click:
MsgBox Err.Description
Resume Exit_undoChanges_Click
End Sub
I have added an Undo Changes button to my Access form, and I would
like to somehow disable it after each click and re-enable it when a
change is made to the form. Currently, I have the following code.
Thanks for any help you might be able to give.
Regards,
Louis
==============================
Private Sub Form_Current()
Me!cmdUndoChanges.Enabled = False
End Sub
Private Sub Form_Dirty(Cancel As Integer)
Me!cmdUndoChanges.Enabled = True
End Sub
Private Sub cmdUndoChanges_Click()
On Error GoTo Err_undoChanges_Click
DoCmd.RunCommand acCmdUndo
Exit_undoChanges_Click:
Exit Sub
Err_undoChanges_Click:
MsgBox Err.Description
Resume Exit_undoChanges_Click
End Sub