I cant add or change a record, a related record is required

T

Timbo2020

Hi, I have created a database using 4 tables. The main table is category
using categoryID as a primary key and category name as another field. That
flows to another table i created that is called Audio_2006 and is using
categoryID as a secondary key and AudioID as a primary key. From the
Audio_2006 table it is connected to two other tables that are called
Audio_Inverntory_2006 using AudioInID as the primary and AudioID and also
AudioAccessoriesID as secondary keys. The Audio_Accessories_2006 table has
AudioAccessoriesID as the primary and AudioID and AudioInID as both secondary
keys linking together all the tables. When I run it, and try to add a new
record an error occurs....

"You cannot add or change a record because a related record is required in
table 'Audio_Inventory_2006'"

I have all the information in each table following the itegrity rules and
the rules for the relationship.

I was wondering if anybody can shed some light on the extent of this error
and what it involves.

Tim
 
M

mnature

To start with, I think you should not have a link from Audio_2006 table to
Audio_Inventory_2006 table. It look like you are trying to list audio
accessories as related to various categories of audio devices. The inventory
table is just a list of accessories, and therefore the accessories table is
how you link distinct items with distinct accessories. Just remove Audio_ID
from the Audio_Invetory_2006 table.

I'm not sure if that will solve your problem, but it does need to be done.
 
A

AccessTaxMan

Your Audio2006 table's AudioID primary already links to your two tables
AudioAccessories and AudioInventory. So you don't need the AudioInID link
from Inventory to Accessories.

I think you should remove the AudioInID field from your Accessories table,
which will do away with that particular relationship, and remove the
AudioAccessoriesID field from you Inventory table, which doesn't seem to be
serving any purpose.
 

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