Undo and operation

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
 
K

Ken Snell

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.
 

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