>As i calling form by form by press command button only, but now i found that i can't release the parent form when calling out the son form.
>
>Example of my coding,
>In parent.cmd_1.click :
>do form son
>thisform.release
>
>
>after i press the button "cmd_1", i still found that the form "parent" are still display on the screen. How can i slove this problem.
>Thx~!
Hi,
This is probably because your child form is Modal. The parent code will wait at the Do Form statement, and only execute the Release once the child itself has been released.
You could set a flag when the user clicks the button on the parent, then in the UNLOAD method of the parent, call the child form.
i.e.
Parent.cmd_1.click
THISFORM.NextFormName = "son"
THISFORM.Release
Parent.Unload
IF NOT EMPTY( THIS.NextFormName)
DO FORM ( THIS.NextFormName)
ENDIF