>This does not help. Here is my code in the LostFocus method of the form:
>
>if ThisForm.DataChanged()
> ThisForm.AskToSave()
>endif
>
>I tried a NODEFAULT outside the IF statement and inside the IF statement. Neither place changes the behavior. I want the AskToSave method to fire before the next form gets focus.
Ok, I see better what you're up to...probably you want to put all your code this elsewhere, in either the form's Close button (assuming you have one) and/or in the Queryunload, where in either case use the Nodefault with your code.
Form Lostfocus or Deactivate are not best-suited for this, I think...
The Anonymous Bureaucrat,
and frankly, quite content not to be
a member of either major US political party.