>I have a lostfocus event associated with a particular field. I would like to suppress the event when the file is closed and this field has the focus. Is there a way? Ta. Denis
Is this a situation where you have a Cancel button on the form and you don't want any validation to run in that case? If so and you've set the Cancel button's Cancel property to .T. then clicking the button is the same as hitting Escape, which makes LASTKEY() = 27. So, you can run your code IF LASTKEY <> 27.