MajP
You've got your good things, and you've got mine.
- Local time
- Today, 12:23
- Joined
- May 21, 2018
- Messages
- 9,990
After some thought, I think I have a relatively easy solution to get this complicated sort order, allow you to visually interpret the results, export the data, and make a report.
It is basically the same code as filling the tree view, but I would write the results to a table as well. It would store the entire sort order for every record in the database and some additional fields for visibility.
That table could link to any data you want to add by CaseNum. With the categories you can then know how things are related. Was not sure how to show offspring of the oldest, sisters and their offspring, and brothers all in the same table without some crazy formatting requiring indenting and offsetting columns. You would order every record deceased or not. If you want to filter out the deceased then just do that in a query. Does not matter because the sort order is the same. If 3 is deceased and filtered out then (1,2,4,5) still sorts properly. Same thing if you include or filter certain males.
So for any record in this table you will be able to look at it and see it is an Oldest Female for a give mother, It is that females offspring, it is a sister to the female, it is a brother, ....
It is basically the same code as filling the tree view, but I would write the results to a table as well. It would store the entire sort order for every record in the database and some additional fields for visibility.
| FAM | Mother | Category | Relation | Relation To | Family member Case Name | Sort Order |
| Family 1 | Oldest Female | 1 | ||||
| Oldest Female Child | Child | Oldest Female CaseName | 2 | |||
| Oldest Female GrandChild | Grand Child | Oldest Female CaseName | 3 | |||
| Oldest Female Great Grand Child | Grand Child | Oldest Female Case Name | 4 | |||
| Sister | Sister | Oldest Female CaseName | 5 | |||
| Sisters Child | Child | Sisters Case name | ||||
| Sisters Grand Child | Grand Child | Sisters Case Name | ||||
| Brother | Brother | Oldest Female CaseName | ||||
| Cousin | Cousin | Oldest Female CaseName | ||||
| Cousin Child | Child | Cousin Child CaseName | ||||
| Family 2 |
That table could link to any data you want to add by CaseNum. With the categories you can then know how things are related. Was not sure how to show offspring of the oldest, sisters and their offspring, and brothers all in the same table without some crazy formatting requiring indenting and offsetting columns. You would order every record deceased or not. If you want to filter out the deceased then just do that in a query. Does not matter because the sort order is the same. If 3 is deceased and filtered out then (1,2,4,5) still sorts properly. Same thing if you include or filter certain males.
So for any record in this table you will be able to look at it and see it is an Oldest Female for a give mother, It is that females offspring, it is a sister to the female, it is a brother, ....