>I am trying to is run a command in a hidden form without the form coming up on screen, but I keep getting errors 'object not found'.
>
>
>my form (frm_statrp) has a cmdreturn button that has following code:
>
>
>&&cmdReturn
>select * from something into array whoknows
>thisform.release()
>
>
>
>my main form called frm_main has the following command to run a command button in frm_statrp
>
>
>do frm_statrep.cmdReturn.click()
>
>
>
>how do I issue a command in another form without leaving current form?
>
You've gotten answers from both Nancy and Bob that address the immediate issue, but the real question is why you need to access code inside a form method from outside the form. From my POV at least, it'd make more sense to move the common code out of the form, perhaps into a business object of some sort, and then pass a reference to the object containing the common method to whatever needs it. If the form and something outside the form need the method code, there's a strong implication, in my mind at least, that the form and whatever is referencing the form's method have a commonality that's forcing you to break encapsulation. Maybe the code belongs to something that the two share in common...