A related record is required... (1 Viewer)

david.paton

Registered User.
Local time
Today, 02:11
Joined
Jun 26, 2013
Messages
338
I have a form called frmChild and when I try and enter something in the notes section at the bottom I get an error, you cannot add or change a record because a related record is required in table tblchild.

I keep getting error messages like this. Can someone tell me what I am doing wrong and how I fix this please?
 

Attachments

  • Carers.v11.accdb.zip
    346.4 KB · Views: 32

MarkK

bit cruncher
Local time
Today, 02:11
Joined
Mar 17, 2004
Messages
8,181
It looks like in your relationship diagram you have joined tblChild to tblChildNotes using different fields than you are using to join the frmChild main form to the 'tblChildNotes subform1' subform. Mostly likely it is this conflict that is preventing the subform from saving records when hosted on that main form, with those conflicting values in the LinkMasterFields and LinkChildFields properties of the subform control.
I would expect that the fields that you use to join that tables should be the same fields you use to join the forms.
hth
Mark
 

david.paton

Registered User.
Local time
Today, 02:11
Joined
Jun 26, 2013
Messages
338
Thanks for that. Now it works perfectly. I just needed to add in a joining table.
 

Users who are viewing this thread

Top Bottom