/ Published in: Visual Basic

Set TimerInterval to 1000
Add a command button called cmdUndo, which will be enabled the moment the form is edited.
Add a command button called cmdUndo, which will be enabled the moment the form is edited.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
Private Sub Form_Timer() ' the Timer Interval has been set at 1000, that is, once per second. Static bFlag As Boolean If Me.Dirty Then If Not bFlag Then Me!cmdUndo.Enabled = True bFlag = True End If Else If bFlag Then Me!txtFirstName.SetFocus Me!cmdUndo.Enabled = False bFlag = False End If End If End Sub Sub cmdUndo_Click() ' same action as clicking Undo from the Edit menu DoCmd.RunCommand acCmdUndo End Sub
Comments
