>>I'm not sure I completely grasp our problem, but I think you are grappling with the issue of Modal vs >Modeless forms. When calling a Modeless form, execution in hte calling procedure is halted and >control is passed to the called form. Execution of the calling procedure does not continue until the >modal form is closed.
>>
>
>
>I take it you meant to say 'modeless' at this point. Or I'm going to get even more confused!
>
Woops. Sorry if I confused you further.
>If so, that it is no more than I expect. The problem is that it doesn't always happen like that.
>
>In my example, the Address form is - or was until my bodge - modeless windowtype 0.
>
>If the user invoked it from another form with the hotkey (alt a) then it behaves exactly as you describe.
>
>If, on the other hand, they enter an account reference on the other form which doesn't exist in the address book, they are invited to add the new address now. If they say 'Yes', then the address form is run for them by the program so that they can add the new address. However, until my programmatic change to force the form to become modal windowtype 1, execution zapped straight past the form and crashed the program.
>
>I do not understand why it works Modeless in one situation and requires Modal status in the next.
If I understand what is happeining correctly, then it seems everything is behaving as it should. Leavinghte Address form modeless causees the calling procedure to continue processing before the user closes the address form...
In situations like these, I just always leave the address form modal. Why not? Just make sure you give the user a cancel button as well as a save.
Erik Moore
Clientelligence