I have a form (main) with an unrelated (no Parent/child relationship) subform (subform1) nested in subform1 is subform2 that has a parent/child relationship with subform1.
Within the footer of subform2 I have placed a 1 row listbox where the rowsource is a table and the criteria in the Whereclause references the value of a combobox on form(main).
The sql statement works fine in a query and also works as a listbox control when the control is placed on form(main).
I cannot get it to return a value when the listbox is placed in the footer of subform2.
Form Main = frm_TestInput
subform1 = frm_TestData
subform2 = frm_TestDetail
The sql that works for the listbox when placed on Form(Main) is:
SELECT lkup_LeaseRatios.BOperMMCF, lkup_LeaseRatios.LeaseNumber FROM lkup_LeaseRatios WHERE (((lkup_LeaseRatios.LeaseNumber)=[Forms]![frm_TestInput]![cbo_LeaseNumber]));
I'm pretty sure that it's a reference problem pertaining to [cbo_LeaseNumber] but I'm stuck on how to fix it.
Within the footer of subform2 I have placed a 1 row listbox where the rowsource is a table and the criteria in the Whereclause references the value of a combobox on form(main).
The sql statement works fine in a query and also works as a listbox control when the control is placed on form(main).
I cannot get it to return a value when the listbox is placed in the footer of subform2.
Form Main = frm_TestInput
subform1 = frm_TestData
subform2 = frm_TestDetail
The sql that works for the listbox when placed on Form(Main) is:
SELECT lkup_LeaseRatios.BOperMMCF, lkup_LeaseRatios.LeaseNumber FROM lkup_LeaseRatios WHERE (((lkup_LeaseRatios.LeaseNumber)=[Forms]![frm_TestInput]![cbo_LeaseNumber]));
I'm pretty sure that it's a reference problem pertaining to [cbo_LeaseNumber] but I'm stuck on how to fix it.