G
Guest
I have a subform that is in a datasheet view, I also have an undo button in
the master form. I would like that if I make any changes in the subform,
that I would be able to undo the changes using the undo button thats on the
master form. When I make changes, and press undo, popup box says that undo is
not available now Currently i have the following code in the subform
Private Sub Form_Current()
Forms![Emplmasterform].[Form]!cmdUndo.Enabled = False
End Sub
Private Sub Form_Dirty(Cancel As Integer)
Forms![Emplmasterform].[Form]!cmdUndo.Enabled = True
End Sub
**************************************************
'undo code, button in the masterform!
*************************************************
Sub cmdUndo_Click()
On Error GoTo Err_cmdUndo_Click
DoCmd.RunCommand acCmdUndo
Exit_cmdUndo_Click:
Exit Sub
Err_cmdUndo_Click:
MsgBox Err.Description
Resume Exit_cmdUndo_Click
End Sub
the master form. I would like that if I make any changes in the subform,
that I would be able to undo the changes using the undo button thats on the
master form. When I make changes, and press undo, popup box says that undo is
not available now Currently i have the following code in the subform
Private Sub Form_Current()
Forms![Emplmasterform].[Form]!cmdUndo.Enabled = False
End Sub
Private Sub Form_Dirty(Cancel As Integer)
Forms![Emplmasterform].[Form]!cmdUndo.Enabled = True
End Sub
**************************************************
'undo code, button in the masterform!
*************************************************
Sub cmdUndo_Click()
On Error GoTo Err_cmdUndo_Click
DoCmd.RunCommand acCmdUndo
Exit_cmdUndo_Click:
Exit Sub
Err_cmdUndo_Click:
MsgBox Err.Description
Resume Exit_cmdUndo_Click
End Sub