>Sergey...
>
>>It has something to do with the scope of 'lcRetVal' variable. If you >make it a property of the form, it works properly.
>
>>DO FORM FORM2 TO Thisform.lcRetVal
>
>You are right - problem solved! Any idea why this behaviour is so? I guess it is something to do with the fact that the toolbar 'diverts' control from the modal form to the close-button click event, and the local variable may temporarily go out of scope.
>
Alan,
Yes, I guess something like that.
--sb--