Mark,
How about moving the modality condition to the start of the problem? make the form modal or not when it first instantiates based on the condition.
>>
>>How about making the form Modal?
>
>Nope. Can't do that. Re-read my entire problem. Actually I have found a clever solution. When the condition exists where I have to
simulate a modal form, I change the form's AlwaysOnTop property to true. The problem was the Deactivate was firing twice -- once when the user clicks on another form and once because of the messagebox. In the Deactivate, I put:
>if This.lAddMode
> if empty(This.Tag)
> This.Tag = "NOMSG"
> MessageBox('You must first complete or cancel the addition of the new record.', MB_ICONEXCLAMATION, "Warning...")
> This.Show()
> else
> This.Show()
> This.Tag = ""
> endif
>else
> DoDefault()
>endif
>This is kind of a kludge, so I am open for more elegant options.