Forum Discussion

Tony2021's avatar
Tony2021
Iron Contributor
May 06, 2022
Solved

Subform Calling

Hello Experts,

 

I have 2 subforms and a helper field I am using to link the 2 subforms:

subform1: subfrmFX (in the footer on frmFXTracker)

subform2: subfrmRollsChild (in the footer of frmFXTracker)

field: txtIDLink

I know that I can not link the 2 subforms by Master and Child unless I have a helper field on the form that the Master refers to. Referring to this field is my problem since I seem to not know the order.  

 

below is what I have tried so far and a msgbox appears asking for a value for txtIDRollsPK and a #Name in txtIDLink when form opens: 

=[Forms]![subfrmFX ].[subfrmRollsChild].[Form].[txtIDRollsPK]

=[subfrmFX]![Form].[subfrmRollsChild].[Form].[txtIDRollsPK]

=[frmFXTracker]![subfrmRollsChild].[Form].[txtIDRollsPK]

Do you see where I have made the mistake? 

 

thank you

 

2 Replies

  • arnel_gp's avatar
    arnel_gp
    Iron Contributor
    try:

    =[subfrmRollsChild].[Form]![txtIDRollsPK]
    • Tony2021's avatar
      Tony2021
      Iron Contributor

      arnel_gp 

      Perfect. Thank you once again for your help! I think the source of my confusion is that I am using an unbound form (frmFXTracker) and in that case its not necessary to reference this unbound form (just the subform names) but if I was using a form with a record source instead of an unbound form, then I would need to reference the form with the record source. I also get confused what to reference (the NAME of the field or the control source.)

       

      For anyone else reading this at my level, in the subform's Link Master and Link Child, the master uses the name of the helper field and the Child uses the control source (not the name of the field).

       

       

       

Resources