Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

tree view

Posted on 2001-06-21
6
Medium Priority
?
172 Views
Last Modified: 2010-05-02
i have an access database with three tables
vehicle (vehicle no , type , etc.)
Test (Test ID, vehicle no , smoke reading, smoke result ,test date, etc.)
Brake (Test ID , Axle no, Reading, result, etc.)

1 vehicle has many tests
1 test has many brake tests

first of all will come the vehicle details above of the form
then i want to put all other information in a tree view

Test Date (1/1/1999)
---Smoke
-------smoke reading
-------smoke result
---Brake
-------Axle no -- for example this is axle one
-----------reading
-----------result
-------Axle no -- the same will be done for other axles
-----------reading
-----------result

and the above diagram will be repeated for each test date

Test Date (2/2/1999)
---Smoke
-------smoke reading
-------smoke result
---Brake
-------Axle no -- for example this is axle one
-----------reading
-----------result
-------Axle no -- the same will be done for other axles
-----------reading
-----------result

Is this possible, if yes, how can i do it
0
Comment
Question by:Brave_Heart
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
6 Comments
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 6217253
Hi, is it the element "Smoke" & "Brake" come from same table?

In database, you can use the SQL "Group By" group test's date to show the results.
0
 

Author Comment

by:Brave_Heart
ID: 6217346
but how can i do the tree view ... i never used it at alll  and how can i connect it to database fields
0
 
LVL 53

Expert Comment

by:Ryan Chong
ID: 6217389
Hi, to add items in a listview:

For i = 1 To adodc1.recordset.recordcount
    LVWS.ListItems.Add i, , "" & adodc1.recordset.fields![abc]
    LVWS.ListItems(i).SubItems(1) = "" & adodc1.recordset.fields![xyz]
Next i

Useful Links:

http://abstractvb.com/code.asp?CID=90

http://www.visualasp.com/demo/source/lv4.txt

Can you post the Table design?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 
LVL 3

Accepted Solution

by:
cmgarnett earned 800 total points
ID: 6217428
Certainly not complete and tested code but it may set you off in the right direction.

rs1 = vehicle file by vehicle ID
rs1.movefirst
while not rs1.eof
  Set nodX = tvw1.Nodes.Add(, , rs1!vehicleid, rs1!vehicleid)
  nodX.Expanded = True
  rs2 = test file by test date and test id where vehicle id = rs1!vehicle id
  rs2.movefirst
  while not rs2.eof
    Set nodX = tvw1.Nodes.Add(rs1!vehicleid, tvwChild, rs2!testdate, rs2!testdate)
    nodX.Expanded = True
    rs3 = brake file by test id and axle no
    while not rs3.eof
      Set nodX = tvw1.Nodes.Add(rs2!Testdate, tvwChild, rs3!axleid, rs3!axleid)
      nodX.Expanded = true
    wend
  wend
wend
0
 
LVL 49

Expert Comment

by:DanRollins
ID: 7139677
Hi Brave_Heart,
It appears that you have forgotten this question. I will ask Community Support to close it unless you finalize it within 7 days. I will suggest to:

    Accept cmgarnett's comment(s) as an answer.

Brave_Heart, if you think your question was not answered at all or if you need help, you can simply post a new comment here.  Community Support moderators will follow up.

EXPERTS: If you disagree with that recommendation, please post an explanatory comment.
==========
DanRollins -- EE database cleanup volunteer
0
 
LVL 1

Expert Comment

by:Computer101
ID: 7174006
Comment from expert accepted as expert

Computer101
E-E Moderator
0

Featured Post

Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When trying to find the cause of a problem in VBA or VB6 it's often valuable to know what procedures were executed prior to the error. You can use the Call Stack for that but it is often inadequate because it may show procedures you aren't intereste…
If you have ever used Microsoft Word then you know that it has a good spell checker and it may have occurred to you that the ability to check spelling might be a nice piece of functionality to add to certain applications of yours. Well the code that…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…
Suggested Courses

610 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question