Hi
I need to display two trees in an access form. The first tree has Questions(nodes with check
boxes),ex:Q1,Q2,Q3,Q4,Q5,Q6....Qn. In an example case If the user selects Q1,Q2,Q3,Q4 then i need to come up with
second tree called fields selection Tree where in which the parent nodes are permutations and combinations(power
set) of
Questions selected.
In this case
Q1Q2Q3Q4,Q1Q2Q3,Q1Q3Q4,Q1Q2Q4,Q2Q3Q4,Q1Q2,Q1Q3,Q1Q 4,Q2Q3,Q2Q4,Q3Q4,Q1,Q2,Q3,Q4.So its basically 2powerN -1
combinations (for 4 questions selected , its 15 parent nodes in second tree,if its 5 then 2pwr5-1=32-1=31 parent
nodes in second tree). Q1Q2 is same as Q2Q1.I need to display 4s combinations,3s combinations,2s and then 1 in
decreasing order.But the real problem is here. Under node
Q1Q2Q3Q4 i need to display fields that are common to all Q1Q2Q3Q4 and under the fields as many number of nodes to
number of Questions(i.e. again Q1,Q2,Q3,Q4 as 4 grand children nodes). Under Q1Q2Q3 parent , display fields
(children nodes) common to Q1Q2Q3 only
(it should not show field common to all 4 again) and Q1,Q2,Q3 under it(grand children repeat for each field) and
so on. To explain this, continue the
same example
For Q1, Fields F1,F2,F3,F4,F5,F6,F7 are available
For Q2: F1,F2,F3,F8,F9,F10,F11,F12
Q3: F1,F3,F6,F10,F13,F14,F15,F16
Q4: F1,F9,F6,F17,F18,F19,F20
SO the second(fields selection) tree should show like this (check box style)
Q1Q2Q3Q4
--F1
-Q1
-Q2
-Q3
-Q4
--Fx(if Fx is common to all Q1Q2Q3Q4)
again all 4 under Field x (Fx)
-Q1
-Q2
-Q3
-Q4
Q1Q2Q3
--F3(common to Q1Q2Q3 ONLY,should not show F1 , even though its common to Q1Q2Q3 because it is already shown in
the Q1Q2Q3Q4 combination)
-Q1
-Q2
-Q3
Q1Q3Q4
--F6 (fields common to Q1Q3Q4 only)
-Q1
-Q3
-Q4
Q1Q2Q4
-- fields common to Q1Q2Q4 only then
-Q1
-Q2
-Q4
-- fields common to Q1Q2Q4 only
then
-Q1
-Q2
-Q4
Q2Q3Q4
--fields common to Q2,Q3,Q4 only
-Q2
-Q3
-Q4
--fields common to Q2,Q3,Q4 only
-Q2
-Q3
-Q4
Q1Q2
--F1
--F2
--F3
Q1Q3
--F1
--F3
--(NO F6 here..because its already out there under Q1Q3Q4 )
Q1Q4
---
Q2Q3
Q2Q4
Q3Q4
Q1
Q2
Q3
Q4
--
and so on. No Question(Parent) node if there are no common fields for that combiation of questions.
I went up to Powerset creation, finding common fields between Question combinations, but not able to filter for
displaying Fields common to that combination ONLY..(yes, the "ONLY" is very important here).
I have a lot hope that somebody will help me in this forum. Please.. please help....