sure yo can... just create a variable of type form, pointing the form you want, and call it's functions or run it... but... it will be a different instance of the form...
That's the issue I need to call the proper form rather than just the form of the main form. Therefore I need something of the sort currform.(subformname).form.(function). This can be used for the main form to call the current subform but I do not know how I could get the same thing the other way round.
Or you could use the OnTimer trigger on the main form to call a function on the subform every few ms.
Or move all the code from the form to a single instance codeunit, and use it from both the main-form and sub-form. (But then you should ensure the main form is only open once or be able to support it)
Actually I need to trigger a function onto the main form once a record is modified in the subform.
Obviously you're working on classic client, don't you? Then I think you have to redesign your application. A function on a main form that has to be called by a subform isn't a proper application design. And you have to bear in mind that in future (RTC) you won't have any function on GUI.
"Money is likewise the greatest chance and the greatest scourge of mankind."
Comments
Or you could try by SendKeys explained in this topic http://www.mibuso.com/forum/viewtopic.php?p=136085.
Perhaps you should think about redesign your application.
Or move all the code from the form to a single instance codeunit, and use it from both the main-form and sub-form. (But then you should ensure the main form is only open once or be able to support it)
Depends what you are trying to do...
Peter
Move the code to the table in the sub form and have it triggered there.
No PM,please use the forum. || May the <SOLVED>-attribute be in your title!