Microsoft Access 2010 Error

Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

techie4life

Thread Starter
Joined
Oct 13, 2012
Messages
2
I'm trying to plan an event for school and I keep getting this Referential Integrity error message. I am trying to make a One-To-Many Relationship between the Clients Table & Events Table. The error message reads:

"Microsoft Access can't create the relationship & enforce referential integrity. Data in the table 'Events' violates referential integrity rules."

I tried to upload a screen shot but it was too big for the attachment so I can't do that I guess.

Please help me out. Would I need a foreign key for this to work? Just wondering.
 

OBP

Joined
Mar 8, 2005
Messages
19,895
It means that you have data in the Events table for a Client that does not exist in the Clients table.
Remove the offending Record(s) from the Events table and then you will be able to do so.

You should of course have a a foregn key for the ClientId in the Events table.
 

techie4life

Thread Starter
Joined
Oct 13, 2012
Messages
2
How do I create a Foreign Key? Please explain how to do it for these two tables, thanks!
 
Joined
Aug 5, 2005
Messages
3,086
It is usually best to create relationships between tables before entering data into those tables. If you were importing the data, you might consider clearing the tables, creating your relationships, and then re-importing the data. The offending record(s) still won't post, but at least your database design will be (potentially) in better shape.

chris.
 
Status
This thread has been Locked and is not open to further replies. Please start a New Thread if you're having a similar issue. View our Welcome Guide to learn how to use this site.

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 807,865 other people just like you!

Latest posts

Staff online

Members online

Top