I have a query which is used in two forms.
Both forms share the same subform and the query depends on a value in the subform.
I have to declare the whole form (form>subform>control) in the query and would like to switch between the 2 forms depending on which of them is the active form. This because of coding/object efficiency.
So I made a simple statement:
IIf("Me"=[Forms]![FRM_SALES];[Forms]![FRM_SALES]![Companylookup]![REL_ID];
[Forms]![FRM_RELATIONS]![Companylookup]![REL_ID])
It seems access isn't able to verify the Me within the IIf because it keeps
prompting me the value of the form which isn't active.
Does anybody know how to raise a condition within a query depending on the
active form?
Both forms share the same subform and the query depends on a value in the subform.
I have to declare the whole form (form>subform>control) in the query and would like to switch between the 2 forms depending on which of them is the active form. This because of coding/object efficiency.
So I made a simple statement:
IIf("Me"=[Forms]![FRM_SALES];[Forms]![FRM_SALES]![Companylookup]![REL_ID];
[Forms]![FRM_RELATIONS]![Companylookup]![REL_ID])
It seems access isn't able to verify the Me within the IIf because it keeps
prompting me the value of the form which isn't active.
Does anybody know how to raise a condition within a query depending on the
active form?