J
jimo
For the source of a subform, I have a query that has as one of its sources a
second query that is dependent on the value of a field in the parent form.
For example:
The data source for subFormA is QueryA. QueryA depends on QueryB (to avoid
ambiguous join issues, otherwise I would combine them in a single query), and
Query B depends on with ControlA field on 'FormParent'.
I don't want to explicitly include the reference to 'FormParent' in QueryB,
however, as I need to maintain a second copy of the FormParent to support
some popup functionality.
Is there a way to reference a control on the parent form referentially
(i.e., without specifying it by name) as a critieria from the Query? If I
was simply in the form, I could use Me.ControlName and be done with it, but
since I needed to run this from a separate query it appears a bit less
straightforward...
I tried [Forms]![subFormA].Parent!ControlA, but that didn't seem to work.
[Forms]![FormParent]![ControlA] works, but requires me to maintain separate
sets of queries and subforms to work with the different copies of the parent
forms...
second query that is dependent on the value of a field in the parent form.
For example:
The data source for subFormA is QueryA. QueryA depends on QueryB (to avoid
ambiguous join issues, otherwise I would combine them in a single query), and
Query B depends on with ControlA field on 'FormParent'.
I don't want to explicitly include the reference to 'FormParent' in QueryB,
however, as I need to maintain a second copy of the FormParent to support
some popup functionality.
Is there a way to reference a control on the parent form referentially
(i.e., without specifying it by name) as a critieria from the Query? If I
was simply in the form, I could use Me.ControlName and be done with it, but
since I needed to run this from a separate query it appears a bit less
straightforward...
I tried [Forms]![subFormA].Parent!ControlA, but that didn't seem to work.
[Forms]![FormParent]![ControlA] works, but requires me to maintain separate
sets of queries and subforms to work with the different copies of the parent
forms...