>Hi.
>On a click of a button, I want to rlease the existing form and call another form, so that when the called from is in focus, the calling form has been released.
If the button is on the calling form, you just can't get things to happen in that order. You can do
thisform.release()
do form OtherForm
but that code would run in an object on the calling form, which then can't release as long as any of its code is still running. So the expected order of events is not achieved - your other form will show, then the caller form will release. May happen just as fast so it may look instantaneous, but if the second form is slow to load, or the first is slow to die, you may see them both for a while.
The solution would be simple - don't put the button on the form, put it somewhere else. As Ed said, you can do that in any forms manager.
Another solution for this would be to have a wizard interface. Instead of killing one form and launching another, why not have a tabless pageframe, so the first page contains whatever your first form had, and the second one what the other had. The button is on the first page, and it only sets thisform.pageframe.activepage=2. You don't even have to close/open tables, everything's set already.