Can't add/change because related record required?

G

Guest

I have a form with linked subforms that I created thru the wizard. It uses 3
tables:

Table 1 - Owners - PK = OwnerID
Table 2 - Animals - PK = AnimalID linked to Owners Table by
OwnerID_AnimalTable
Table 3 - FeesTable - PK = FeeID linked to AnimalTable by AnimalID_FeeTable

I was able to add 1 owner, 1 animal, and some fees for the first owner, but
when I add a second owner, then enter animal info, when I go to the fees
table I get an error message stating " you cannot add or change a record
because a related records is required in table tblOwners." I have a field
that displays the OwnersID on the subform and it's the correct one. I don't
understand what's happening. Could someone shed some light?

Thanks,
RandyM
 
G

Guest

This is more information on this problem. If I add a new owner and then close
the owner form (the main form), and then try to add an animal and fees, it
works. It seems that if I'm adding a new owner and trying to add an animal
and fees at the same time, it won't work. I was able to add an animal and
fees to the first owner without starting over, but for the rest, I can't add
owners, animals and fees at the same time...have to add the owner, close the
owner form, reopen and then I can. I don't understand what's happening? Help!

RandyM - dazed and confused.
 
G

Guest

You might be missing the forign key or have entered it wrong. If one of your
animals doesn't have a related record in the owner table, you'll need to
Disable Referential Integrity in the relations design.
 

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