I have a form with several combo boxes, all with Limit to List on. If a user enters invalid data into one of them, of course he gets the "not in list" message. If he then decides he was on the wrong track and tries to cancel the form (Cancel button click event = Me.Undo), Access still keeps insisting on a valid entry in the combo box. I can't go back and clear it programmaticall y because the focus is now on the Cancel button and I can't tell which control caused the error or what its previous value was.
Of course it is always possible (in fact, it is necessary) for the user to then delete the erroneous entry or randomly select an acceptable one before cancelling the form, but this is non-intuitive and a bit of a nuisance. Is there any way I can really undo and cancel the form in the Cancel button click event (other than saving all the values of all the controls when the form is opened and then restoring them one by one!)?
Thanks for your help.
Of course it is always possible (in fact, it is necessary) for the user to then delete the erroneous entry or randomly select an acceptable one before cancelling the form, but this is non-intuitive and a bit of a nuisance. Is there any way I can really undo and cancel the form in the Cancel button click event (other than saving all the values of all the controls when the form is opened and then restoring them one by one!)?
Thanks for your help.
Comment