SOLVED

Subform Calling

%3CLINGO-SUB%20id%3D%22lingo-sub-3336439%22%20slang%3D%22en-US%22%3ESubform%20Calling%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3336439%22%20slang%3D%22en-US%22%3E%3CP%3EHello%20Experts%2C%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EI%20have%202%20subforms%20and%20a%20helper%20field%20I%20am%20using%20to%20link%20the%202%20subforms%3A%3C%2FP%3E%3CP%3Esubform1%3A%20subfrmFX%20(in%20the%20footer%20on%20frmFXTracker)%3C%2FP%3E%3CP%3Esubform2%3A%20subfrmRollsChild%20(in%20the%20footer%20of%20frmFXTracker)%3C%2FP%3E%3CP%3Efield%3A%20txtIDLink%3C%2FP%3E%3CP%3EI%20know%20that%20I%20can%20not%20link%20the%202%20subforms%20by%20Master%20and%20Child%20unless%20I%20have%20a%20helper%20field%20on%20the%20form%20that%20the%20Master%20refers%20to.%20Referring%20to%20this%20field%20is%20my%20problem%20since%20I%20seem%20to%20not%20know%20the%20order.%26nbsp%3B%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ebelow%20is%20what%20I%20have%20tried%20so%20far%20and%20a%20msgbox%20appears%20asking%20for%20a%20value%20for%26nbsp%3BtxtIDRollsPK%20and%20a%20%23Name%20in%26nbsp%3BtxtIDLink%20when%20form%20opens%3A%26nbsp%3B%3C%2FP%3E%3CP%3E%3D%5BForms%5D!%5BsubfrmFX%20%5D.%5BsubfrmRollsChild%5D.%5BForm%5D.%5BtxtIDRollsPK%5D%3C%2FP%3E%3CP%3E%3D%5BsubfrmFX%5D!%5BForm%5D.%5BsubfrmRollsChild%5D.%5BForm%5D.%5BtxtIDRollsPK%5D%3C%2FP%3E%3CP%3E%3D%5BfrmFXTracker%5D!%5BsubfrmRollsChild%5D.%5BForm%5D.%5BtxtIDRollsPK%5D%3C%2FP%3E%3CP%3EDo%20you%20see%20where%20I%20have%20made%20the%20mistake%3F%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3Ethank%20you%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-3336439%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EAccess%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3336570%22%20slang%3D%22en-US%22%3ERe%3A%20Subform%20Calling%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3336570%22%20slang%3D%22en-US%22%3Etry%3A%3CBR%20%2F%3E%3CBR%20%2F%3E%3D%5BsubfrmRollsChild%5D.%5BForm%5D!%5BtxtIDRollsPK%5D%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-3337490%22%20slang%3D%22en-US%22%3ERe%3A%20Subform%20Calling%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-3337490%22%20slang%3D%22en-US%22%3E%3CP%3E%3CA%20href%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F1228265%22%20target%3D%22_blank%22%3E%40arnel_gp%3C%2FA%3E%26nbsp%3B%3C%2FP%3E%3CP%3EPerfect.%20Thank%20you%20once%20again%20for%20your%20help!%20I%20think%20the%20source%20of%20my%20confusion%20is%20that%20I%20am%20using%20an%20unbound%20form%20(frmFXTracker)%20and%20in%20that%20case%20its%20not%20necessary%20to%20reference%20this%20unbound%20form%20(just%20the%20subform%20names)%20but%20if%20I%20was%20using%20a%20form%20with%20a%20record%20source%20instead%20of%20an%20unbound%20form%2C%20then%20I%20would%20need%20to%20reference%20the%20form%20with%20the%20record%20source.%20I%20also%20get%20confused%20what%20to%20reference%20(the%20NAME%20of%20the%20field%20or%20the%20control%20source.)%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3EFor%20anyone%20else%20reading%20this%20at%20my%20level%2C%20in%20the%20subform's%20Link%20Master%20and%20Link%20Child%2C%20the%20master%20uses%20the%20%3CSTRONG%3Ename%3C%2FSTRONG%3E%20of%20the%20helper%20field%20and%20the%20Child%20uses%20the%20%3CSTRONG%3Econtrol%20source%3C%2FSTRONG%3E%20(not%20the%20name%20of%20the%20field).%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%3CSPAN%20class%3D%22lia-inline-image-display-wrapper%20lia-image-align-inline%22%20image-alt%3D%22Tony2021_1-1651934536140.png%22%20style%3D%22width%3A%20400px%3B%22%3E%3CIMG%20src%3D%22https%3A%2F%2Ftechcommunity.microsoft.com%2Ft5%2Fimage%2Fserverpage%2Fimage-id%2F369944iA956AF74B476372B%2Fimage-size%2Fmedium%3Fv%3Dv2%26amp%3Bpx%3D400%22%20role%3D%22button%22%20title%3D%22Tony2021_1-1651934536140.png%22%20alt%3D%22Tony2021_1-1651934536140.png%22%20%2F%3E%3C%2FSPAN%3E%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3CP%3E%26nbsp%3B%3C%2FP%3E%3C%2FLINGO-BODY%3E
Super Contributor

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
best response confirmed by Tony2021 (Super Contributor)
Solution
try:

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

@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).

 

Tony2021_1-1651934536140.png