linking sub forms (1 Viewer)

ClaraBarton

Registered User.
Local time
Today, 09:43
Joined
Oct 14, 2019
Messages
427
I have a database with the father on the parent form linked to the children as a subform. Works fine. The mother is a different record on the parent form and I'd like to link her to these same children. I created a FatherID and a MotherID on the child table but when I link two fields (parent;parent2 and child;child2) I lose everything. Is there a way here?
 

Ranman256

Well-known member
Local time
Today, 12:43
Joined
Apr 9, 2015
Messages
4,339
you normally to Parent as master and children as children(ha)
you may need 3 subforms:
for the Parents record with ParentsID, FatherID, MotherID in the master
1 subform to show name of fatherID
1 subform to show name of MotherID
1 subform to show list of children having ParentsID
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:43
Joined
Oct 29, 2018
Messages
21,358
Hi. The way I might go about this is add a FamilyID field to tie everyone together. Just a thought...
 

Fira_g

Registered User.
Local time
Today, 12:43
Joined
Oct 17, 2019
Messages
60
Maybe something like this:
 

Attachments

  • family.png
    family.png
    8.5 KB · Views: 85

ClaraBarton

Registered User.
Local time
Today, 09:43
Joined
Oct 14, 2019
Messages
427
Aargh! This is driving me nuts! It seems so simple. But it doesn't work. Although the children are connected through the parent.memno, it is actually the ID field that relates them on the reports. Each parent has a different ID. So... Each parent is listed on the report, with both showing their children. I have a whole new respect for genealogists!
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:43
Joined
Oct 29, 2018
Messages
21,358
Hi Clara. I know it can be frustrating. Like I said though, if it was me, I will just add one more field to designate the Family Group. However, I don't know if that will make your life any easier. Good luck!
 

ClaraBarton

Registered User.
Local time
Today, 09:43
Joined
Oct 14, 2019
Messages
427
You were so right! Again! I added a parent field to both the Parent and Child Form and the Children show up beautifully on both parent (father and mother) records. Now... I'd like to show both parent names on the child form, (it's a pop form for additions and edits). I need 2 calculated fields to get the Father and the Mother. This creates 2 child records. I tried grouping by the child ID... still 2 records. Why can't I get 1 record with 2 calculated fields?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:43
Joined
Oct 29, 2018
Messages
21,358
You were so right! Again! I added a parent field to both the Parent and Child Form and the Children show up beautifully on both parent (father and mother) records. Now... I'd like to show both parent names on the child form, (it's a pop form for additions and edits). I need 2 calculated fields to get the Father and the Mother. This creates 2 child records. I tried grouping by the child ID... still 2 records. Why can't I get 1 record with 2 calculated fields?
Hi Clara. Glad to hear you're making good progress. I don't know why you can't get 2 calculated fields to work, you should be able to. However, if it was me again, I would probably use a subform instead. Just a thought...
 

ClaraBarton

Registered User.
Local time
Today, 09:43
Joined
Oct 14, 2019
Messages
427
Ah... to pull info from the form that's calling the pop form? Does that seem redundant?
 

theDBguy

I’m here to help
Staff member
Local time
Today, 09:43
Joined
Oct 29, 2018
Messages
21,358
Ah... to pull info from the form that's calling the pop form? Does that seem redundant?
Not sure what you're doing (I can't see your forms), so I don't think that's what I was saying. You said you wanted to display the parents, and the parents are stored in the table, so I was thinking pull them from the table. The only reason I suggested a subform is because you're trying to pull two records from the table, which I thought would be easier to display as a subform rather than try to pull each one. However, as I said, doing so should still be possible.
 

Users who are viewing this thread

Top Bottom