[SOLVED] Create new subform entry from main form

[SOLVED] Create new subform entry from main form

Hi!

So, I want to do the following.

Form A = Missions

Form B = Messages

Form B is the subform of form A

Im trying to create a function in form B (not as the subform, but as the "add" form) which allows you to answer a question which was generated in the subform.

Basically, when the user clicks on "answer the question" button on form B, it should be seen in Form A as a subform entry.

I have managed to create the following function (and it doesnt complain, but wont work).

Form B has a lookupfield (exisiting relationship) to form A, but it cant relate the new entry as a subentry to form A.

  1. void FORM B(Form B myVar)
    {
        MyVar5 = Form A[ID == myVar.Form_A_Lookup];
        input.id = MyVar5;
        openUrl("#Form:FORMB?Form_A_Lookup" +input.id+ "", "Same window");
    }


also tried

  1. void FORM B(int id)
    {
        MyVar5 = Form A[ID == input.id];
        openUrl("#Form:FORMB?Form_A_Lookup" +MyVar5+ "", "Same window");
    }

What am I doing wrong? How can I make the new entry be also seen as the subentry of the parent?


/V