Hi Minty,
thank you
A number of points, some about overall design, some about your issue;
I think your problem here is the use of a junction table.
It appears unnecessary with this data model. You have Bowls, you should simply save the bowl ID as a fk with the kitten details.
The junction table is not adding anything other than complication.
It has one purpose - to avoid nullable FK keys.
Kitten can have multiple bowls, but also can not have any bowls.
If there is a Many to Many relationship then you require a Junction table.
it is many-to-many relationship.
The main problem you have is that your aren't populating the correct tables with your sub form.
What if i have one additional table here?
So every kitten can have multiple toys.
So on forms i would add subform to QBowl form.
so in this case there would be not place for subform for kitten bowls. This should be done automatically without adding any subforms.
I found technical way to solve this.
On subform Bowl i used:
Code:
Private Sub Form_BeforeInsert(Cancel As Integer)
If Nz(Me.CatChildID.Value) = "" Then
Me.CatChildID.Value = Form_MainForm.CatsID.Value
End If
End Sub
Thank you for help,
Jacek