||Re: closing form
Milind Nighojkar <firstname.lastname@example.org>
||Thu, 25 Nov 2021 12:18:48 -0500
Thanks for the reply. I learned the new way of hadling it. Also a new syntax.
I tried but could not succeed.
I will once again give it a try and will connect with you on this.
Akshat Kapoor Wrote:
> Good Evening Milind,
> > Scenerio. form A is opened
> > Wanted to close this form
> > Iuused a syntax : CLOSE FORMS A
> > Get error : No such form A
> > Any suggestions
> I would suggest you have a look at help of findinstance()
> In the below example e_sales2form is the class name
> ** END HEADER -- do not remove this line
> // Generated on 29.10.2021
> parameter bModal
> local f
> f = new e_sales2form()
> if (bModal)
> f.mdi = false // ensure not MDI
> class e_sales2form of MUNEEM from "muneem.cfm"
> So something of the following sort should work
> X = findinstance('e_sales2form')
> if not empty(X)
> If you are executing the code from within the form then simply
> form.close() is sufficient.
> I hope this helps.