Skip to Content

​How To Reference New Form Open Form From Menu Event

Mar 07 at 07:40 PM


avatar image


I’m trying to figure out how would I reference a new form from a menu event? I will give you an example. The below code would call the duplicate method and copy data from the current form to the new one.


After when the above event is fired and it duplicate the data, I want to know how can I reference the new form in a variable so I can add additional values to it?

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

1 Answer

Best Answer
Danilo Kasparian Mar 08 at 01:18 PM

After you open this new form add an UserDataSource and set your "base" FormUID there, in the new form you will be able to read the FormUID and read whatever you need from the "base" form

Show 3 Share
10 |10000 characters needed characters left characters exceeded

Hi Danilo,

I was hoping when I did called BO_Application.Menus.Item("1287").Activate() method it would return some type of ID to reference the new form. Is there a way this can be done or would I need to rewrite my code in a different way to reference the form? Please note though if the code need to be rewrite in a different way, it still must execute the form duplicate method which this method BO_Application.Menus.Item("1287").Activate() already does.




It doesn`t return, but we can get the active form, which will be the one you have just opened


Thanks for the tip. I learned after I call BO_Application.Menus.Item("1287").Activate() , I can call SBO_Application.Forms.ActiveForm to refrence the new form ID to a form varirble.