treeview question

A

accessuser1308

I have built a database to track my family tree. Each individual is assigned
a unique ID. I have a subtable that is linked to this ID. The subtable
contains a parent ID. The subtable will contain an entry for the mother and
the father. I have a treeview on form that is based on a query using the two
tables. My problem is the "WhoID" from the parent table will be in the query
twice, once for mother entry and once for father entry in the subtable. I
would like to have treeview with parent node for mother, a parent node for
mother, and a child node for the child found under both parents (Such that in
tracing the family history both mother and father show later generations). I
keep getting an "index out of range". Is there a way to associate the data
such that I can design my treeview to display children under both parents (in
separate areas of the tree)?

Thank you for any help
 
B

Bob Quintal

=?Utf-8?B?YWNjZXNzdXNlcjEzMDg=?=
I have built a database to track my family tree. Each individual
is assigned a unique ID. I have a subtable that is linked to this
ID. The subtable contains a parent ID. The subtable will contain
an entry for the mother and the father. I have a treeview on form
that is based on a query using the two tables. My problem is the
"WhoID" from the parent table will be in the query twice, once for
mother entry and once for father entry in the subtable. I would
like to have treeview with parent node for mother, a parent node
for mother, and a child node for the child found under both
parents (Such that in tracing the family history both mother and
father show later generations). I keep getting an "index out of
range". Is there a way to associate the data such that I can
design my treeview to display children under both parents (in
separate areas of the tree)?

Thank you for any help

"My problem is the"WhoID" from the parent table will be in the query
twice, once for mother entry and once for father".

In the query design tool, add a second instance of the parent table.
Notice that Access has added a _1 to the name of the second instance.
You can change the names to say Mom and Pop in the Alias row on the
General tab of the properties box,

Join the motherID from the subtable to one instance of the parent
table and the fatherID to the other instance of the parent table.
That allows Access to maintain separate index pointers when
performing the query.

That should solve your problem.
 
A

accessuser1308

Bob Quintal said:
"My problem is the"WhoID" from the parent table will be in the query
twice, once for mother entry and once for father".

In the query design tool, add a second instance of the parent table.
Notice that Access has added a _1 to the name of the second instance.
You can change the names to say Mom and Pop in the Alias row on the
General tab of the properties box,

Join the motherID from the subtable to one instance of the parent
table and the fatherID to the other instance of the parent table.
That allows Access to maintain separate index pointers when
performing the query.

That should solve your problem.
If I do this I will have 2 parentID fields in the query...one from mother
and one from father. How can I associate my WhoID with both of these such
that the child will show up under the node of each parent? I had this setup
at first, but could not figure out how to make the treeview work correctly.
I had to make two trees, one with Who ID associated with mother and the other
associated with father. I would really like one tree where the child will be
displayed both with the mother and with the father.

Thanks for your help
 
B

Bob Quintal

=?Utf-8?B?YWNjZXNzdXNlcjEzMDg=?=
If I do this I will have 2 parentID fields in the query...one from
mother and one from father. How can I associate my WhoID with
both of these such that the child will show up under the node of
each parent? I had this setup at first, but could not figure out
how to make the treeview work correctly. I had to make two trees,
one with Who ID associated with mother and the other associated
with father. I would really like one tree where the child will be
displayed both with the mother and with the father.

Thanks for your help
I've never seen a family tree like what you describe what you want,
and I have been doing genealogical research for 40 years.

However, I would imagine using 1 copy of the People table and two
copies of the parents subtables, and a two copies of the people table
to get the children would work.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top