Combo box

  • Thread starter Thread starter Paul
  • Start date Start date
P

Paul

I have a "bounded" combo box in a form. I want to retain the "Old" value
before user change to a "New" value, so that in the "Before Update" event of
the combo box, it will pop up a message to ask the user to confirm the
change and if needed the "New" value can be rolled back/Undo to the "Old"
value. Question...How to roll back/Undo change to the combo box? I tried the
"Before Update" event and it did not work and the error read that I can not
cancel the data save to the table. Also should I use the "OnChange" event to
retain the OLD value. Thanks.
 
Try the combo's AfterUpdate event:

Private Sub MyCombo_AfterUpdate
If MsgBox("Keep this change?", vbYesNo) <> vbYes Then
Me.MyCombo.Undo
End If
End Sub
 
Back
Top