Hi,
I'm trying to use the Undo example in Microsoft Help (see below) on a form to reset the values of txt controls but keep getting the following error:
Run-time error '424'
Object Required
Can anybody help me?
Poctok
***
Example from Help -
Private Sub cmdUndoEdits_Click()
Private Sub btnUndo_Click()
Dim ctlTextbox As Control
For Each ctlTextbox In Me.Controls
If ctlTextbox.ControlType = acTextBox Then
ctlTextbox.Value = ctl.OldValue
End If
Next ctlTextbox
End Sub
I'm trying to use the Undo example in Microsoft Help (see below) on a form to reset the values of txt controls but keep getting the following error:
Run-time error '424'
Object Required
Can anybody help me?
Poctok
***
Example from Help -
Private Sub cmdUndoEdits_Click()
Private Sub btnUndo_Click()
Dim ctlTextbox As Control
For Each ctlTextbox In Me.Controls
If ctlTextbox.ControlType = acTextBox Then
ctlTextbox.Value = ctl.OldValue
End If
Next ctlTextbox
End Sub