Cancel Changes and exit Button

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top