>I have code in my base form to close the form when the user
>presses Escape.
>
>If there are unsaved changes, the user is prompted.
>
>If I have a textbox or editbox on the form, and the user is entering
>data, then presses escape without first saving, the changes in the text field or textbox they are currently in just simply dissapear. You can see the text just 'go away' when escape is pressed.
>
>How can I prevent this from happening?
Setfocus to something before doing anything else, pretty much any control will do, to get the data into the buffer field.
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.