georgesOne
Technical User
Hi,
I have a normalized table of formulations with the structure:
Formulation Compound
F1 AA
F1 BB
F2 CC
F3 AA
F3 CC
F3 DD
F4 BB
F4 AA
Now I want to find all records which contain at least one of the compounds in - as an example - formulation F1... (i.e. the match can contain AA or BB or (AA and BB) -> Result: F3, F4 containing AA) and those which contain exactly and only the same compounds (i.e. the match must contain AA and BB -> F4 containing AA and BB).
The search criteria are a result of a "Query34"
SELECT DISTINCT tblFDataNorm.Formulation, tblFDataNorm.Compound
FROM tblFDataNorm
WHERE (((tblFDataNorm.Formulation)=bss_fFindVar(1)) which results in
Formulation Compound
F1 AA
F1 BB
where bss_fFindVar(1) gets the current Formulation value from a form textbox.
I have no clear clue, especially how to get the latter. The first can be optained through a join query between "tblfDataNorm" and "Query34" on compound, I believe.
Any guidance is appreciated.
Kind regards, georges
I have a normalized table of formulations with the structure:
Formulation Compound
F1 AA
F1 BB
F2 CC
F3 AA
F3 CC
F3 DD
F4 BB
F4 AA
Now I want to find all records which contain at least one of the compounds in - as an example - formulation F1... (i.e. the match can contain AA or BB or (AA and BB) -> Result: F3, F4 containing AA) and those which contain exactly and only the same compounds (i.e. the match must contain AA and BB -> F4 containing AA and BB).
The search criteria are a result of a "Query34"
SELECT DISTINCT tblFDataNorm.Formulation, tblFDataNorm.Compound
FROM tblFDataNorm
WHERE (((tblFDataNorm.Formulation)=bss_fFindVar(1)) which results in
Formulation Compound
F1 AA
F1 BB
where bss_fFindVar(1) gets the current Formulation value from a form textbox.
I have no clear clue, especially how to get the latter. The first can be optained through a join query between "tblfDataNorm" and "Query34" on compound, I believe.
Any guidance is appreciated.
Kind regards, georges