Undo and operation

  • Thread starter Thread starter Brook
  • Start date Start date
B

Brook

I have a pop-up form that allows for me to choose a client
name from a drop down list. I want my cancel button to
undo anything that I have selected in my drop down box and
go back to the original information on my main form.
Someone had mentioned Me.Undo, but I am unsure how to use
this code? Where do I place it?

Brook
 
Me.Undo only works if the form is bound to a record source table or query.
Otherwise, it will have no effect. If you want to revert to an earlier value
in the combo box, assuming that it's not bound, then you'll need to store
that original value somewhere (or read it from the calling form) and set the
value back into the combo box when the Cancel button is clicked. If the
combo box is bound to a field, then you can use its OldValue property to get
the original value and then set the combo box back to that value.
 
Back
Top