>I have a form that won't close how I would like...
>
>In the click event of a button on form #1, I have the following code:
>
>
>CLOSE TABLES all
>
>PRIVATE l_cust, l_loc
>l_cust = thisform.l_custno
>l_loc = thisform.l_location
>
>
>thisform.Release
>DO FORM scaleroute_selection WITH l_cust, l_loc
>
>return
>
>
>I have tried moving the release before and after the do form statement. The kicker is that the child form sometimes also calls a third form (passthrough, if you will). It's when it does this that I appear to have the problem. Is this because I'm passing a form variable on and not able to release? Any help would be greatly appreciated...
Which form won't release, the first? I don't see any reference being passed, and you closed all the tables so there shouldn't be anything in the datasession (assuming the child form(s) live in the same DS) to force it to stay open.
However, if the child form is modal, the parent form won't close until the child form closes. Also note that the form's release won't execute as long as there's code to run inside the form (i.e. current method and anything it calls, including modal forms) - it's queued and executes last.
Does it release once you close the child form? If so, hide it before you release it and don't worry :).