L
Legacy 456155
Guest
Sort of like an UnDirty event or CancelInsert event. I could not find anything about this on the web so maybe my design is faulty or not reasonable. I have an unbound textbox (txtSearch) that shows a listbox if the user enters search text. The listbox contains a list of existing records, which, when one is selected, loads an existing record. If the user adds a new record, I disable txtSearch to disallow trying to add a new record using the listbox in the midst of an insert operation. However, if the user cancels the insert by pressing the escape key or in some other way (is there another way?), I want to re-enable and set focus to txtSearch. I suppose that I could use KeyPreview and capture the escape key. What do you think? Is that comprehensive enough? Any ideas? Thanks for your input!