Thomas,
It most likely works when you run the two forms from the command window and doesn't when you run it from a prg. That's because VFP is creating public memvars for the forms from the command window.
You should not code your two forms so they are forced to know the names of each other. If the bigform launches the littleform it should pass THISFORM to the the littleform.Init() the reference can be stored:
lparameter oLauncher
this.oLauncher = oLauncher
then the click can:
thisform.oLauncher.Release()
thisform.Release()
You can also use the _screen.Forms[] collection and look for a form by it's Name property.
>In a project I an working on I have two forms open at the same time. Bigform and Littleform. Littleform contains a button. In the click event of that button I wish to close both Bigform and Litttleform and use the following code:
>
>Bigform.Release
>Thisform.Release
>
>Occasionally this code works and both objects close, but most of the time I get a message which states that Bigform cannot be found.
>
>Can anyone offer insight into why this happens and how I should rewrite my code.