Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Microsoft Office > Access and Access VBA > Access VBA
|
Access VBA Discuss using VBA for Access programming.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access VBA section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old February 12th, 2012, 08:33 PM
Registered User
 
Join Date: Feb 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default Questions and Fields selection in Tree View control

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....





Similar Threads
Thread Thread Starter Forum Replies Last Post
Tree View Control host in SPS Ram Naresh General .NET 0 July 10th, 2006 05:07 AM
Tree view control g_vamsi_krish ASP.NET 1.0 and 1.1 Basics 2 April 4th, 2006 11:02 PM
Microsoft Tree view control humour General .NET 0 November 27th, 2004 09:40 AM
Tree View Control pran ASP.NET 1.0 and 1.1 Professional 1 September 2nd, 2004 11:41 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.