Hello all,
I have a table that holds data on equipment and machinery in a factory. It will be the basis of a maintenance application. The records are structured (have identifying fields) so that equipment can have sub elements to four levels(five levels in total).
I have created a set using the table linked to itself four times.
A form based on that set has five browses in order to browse through the data. This form is fine for finding a piece of equipment and viewing the relevant data.
However, at various points in other parts of the aplication I want to be able to use a similar method to choose a particular piece of equipment, say when entering work orders or service history. The Tree Control is basically the kind of thing I am looking for and I have created one based on my set that does represent the data correctly.
My problem is that the value returned by the control is always down to the deepest level. If there are five levels and I highlight the third, how do I return just the data that is at that level? I am able to parse the returned value to extract a particular bit but don't know how to get the level that is being highlighted.
I have also attempted an xdialog with a number of list boxes in a progressive fashion but again don't know how to return the data in the active list box.
I have read lots of threads on tree controls but none get to the heart of question ie how to return what level is active.
I have also checked out the Xdialog stuff in the .chm.
Or is there just a better way to this?
I'm not expecting finished code, just point me in the right direction. Attached is sample of my data and tree control.
Many thanks in advance .
I have a table that holds data on equipment and machinery in a factory. It will be the basis of a maintenance application. The records are structured (have identifying fields) so that equipment can have sub elements to four levels(five levels in total).
I have created a set using the table linked to itself four times.
A form based on that set has five browses in order to browse through the data. This form is fine for finding a piece of equipment and viewing the relevant data.
However, at various points in other parts of the aplication I want to be able to use a similar method to choose a particular piece of equipment, say when entering work orders or service history. The Tree Control is basically the kind of thing I am looking for and I have created one based on my set that does represent the data correctly.
My problem is that the value returned by the control is always down to the deepest level. If there are five levels and I highlight the third, how do I return just the data that is at that level? I am able to parse the returned value to extract a particular bit but don't know how to get the level that is being highlighted.
I have also attempted an xdialog with a number of list boxes in a progressive fashion but again don't know how to return the data in the active list box.
I have read lots of threads on tree controls but none get to the heart of question ie how to return what level is active.
I have also checked out the Xdialog stuff in the .chm.
Or is there just a better way to this?
I'm not expecting finished code, just point me in the right direction. Attached is sample of my data and tree control.
Many thanks in advance .
Comment