If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Cancel Changes and exit Button
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 |
#2
|
|||
|
|||
Cancel Changes and exit Button
Nevermind, i needed to use the oldvalue property my bad
"Richard Krupa" wrote in message ... 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 |
Thread Tools | |
Display Modes | |
|
|