The Student Room Group

help access

whenever I link my loan table and copy table in access in the copy table I have two composite keys to link to the other table (loan) to make a double PK and foreign key link but it won't work because it says my loan table violates referential integrity rules
(edited 3 years ago)
Original post by Aoseni
whenever I link my loan table and copy table in access in the copy table I have two composite keys to link to the other table (loan) to make a double PK and foreign key link but it won't work because it says my loan table violates referential integrity rules

Hi there :hi:
I've popped your thread into computer science and ict study help for you to get some more responses :yy:
Have a fab evening,
Cheese :bump:
Original post by Aoseni
whenever I link my loan table and copy table in access in the copy table I have two composite keys to link to the other table (loan) to make a double PK and foreign key link but it won't work because it says my loan table violates referential integrity rules

Could you explain a little bit more about what you're trying to do and what you mean?
Some more information, as MrSandyWilly has said would be great. Doing a quick search this thread came up: https://www.pcreview.co.uk/threads/error-data-in-table-violates-referential-integrity-rules.2595189/

I'll state here, the answer which is probably of most value to you:

"A common cause of this error is a foreign key field that has a default value assigned. For example, Access gives a Number field the Default Value of zero. If you don't assign a value to this field, it automatically gets the zero value, which fails to match any value in the main table, even though you did not specifically assign a value for this field."

It's difficult to help without more information, but I'd look at the values of your foreign keys.

Quick Reply

Latest

Trending

Trending