Cancel Changes and exit Button

  • Thread starter Thread starter Richard Krupa
  • Start date Start date
R

Richard Krupa

Hey Guys,

Im trying to create a cancel changes and exit button and I need some code
that will cancel (undo) all changes made to fields on a button click event
and i cant get the below code to work:

Dim ctrl As Control
For Each ctrl In frm.Controls
If ctrl.ControlType = acTextBox Then
ctrl.Undo
End If
Next ctrl

i dont get any error messages, just that the changes made to the fields are
not undone when i return to the record. any ideas?

Regards,
Richard
 
Back
Top