>>How can I prevent a user from clicking on another form unless they have completed a specific task [under 1 specific condition] on the currently active form. I can not make the currently active form modal because most of the time [90%], the user can jump to other forms.
>>
>>I have tried stuff in the deactivate and lostfocus, but nothing works very cleanly.
>>
>>TIA!
>
>Hi Mark,
>
>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.
Mark McCasland
Midlothian, TX USA