I was wondering if somebody could help me with reusability of subforms and queries, so that they dynamically work depending on what form is loaded.
Problem - I have a query (Q1) which I would like to use as a record source for subform (SF1), which may appear either as a subform nested in form (F1) or in form (F2). The criteria of the query is "where table1.OPID = loaded forms.F1.SF1.OPID". (OPID is a control). I want the query to know that if F1 is loaded then it will equal to F1.SF1.OPID, or if F2 is loaded then it should be F2.SF1.OPID. At the moment I can only get it to work with one form or the other. Can someone help me?
Problem - I have a query (Q1) which I would like to use as a record source for subform (SF1), which may appear either as a subform nested in form (F1) or in form (F2). The criteria of the query is "where table1.OPID = loaded forms.F1.SF1.OPID". (OPID is a control). I want the query to know that if F1 is loaded then it will equal to F1.SF1.OPID, or if F2 is loaded then it should be F2.SF1.OPID. At the moment I can only get it to work with one form or the other. Can someone help me?
Last edited: