Just an add-on to this idea. Make sure the variable you are linking the form is of sufficient scope that it doesn't get destroyed when the same method ends.
If you create a local or private varuable in a method and use it to link your form, the form will be destroyed if the method ends because the variable goes away. Make the variable Public or create it in your top-level program as a private variable and you should be okay.
This is the idea behind a forms manager class. The forms manager object is created in the main program (or somewhere very high in the program execution) and when forms are created, they are linked to a collection property of the class.
>If you're using Do Form, use Do Form (formname) Name (variable) Linked - this will then enable you to use your name variable instead of thisform. Linked will ensure the form referenced gets dumped when the variable goes out of scope.
>
>>Can anyone explain why I always have to use thisform instead of the real name of the form? Up until now it has just been a curiosity but now it is more than that. I have taken an app. that usually requires a user and made it automate itself. In the init of the main form I use a do form command to start up another form. The code for the second form contains thisform.release but when it executes it is the main form that is released and not the second one that was called. Would anyone care to educate me??
>>Thanks
>>Carl Burkhart
>>DP Programmer
>>BrannRMG
Larry Miller
MCSD
LWMiller3@verizon.netAccumulate learning by study, understand what you learn by questioning. -- Mingjiao