• Register
0 votes
74 views

Problem :

I am facing the below error :

“Microsoft access can't create this relationship and enforce referential integrity”

I have already checked everything for the errors: primary key, uniqueness, and type. But the Access is just unable to link the 2 fields which I have in my database. can someone please let me know the solution if any?

6 5 3
7,540 points

Please log in or register to answer this question.

1 Answer

0 votes

Solution :

Actually I think you need an index on your name fields, on both sides

But, I also want to suggest you that you are having way too many joins? Ideally there should be only one join from the one table to the other. It is very rare to have more than one join between the tables, and I can say exceedingly rare to have more than two joins.

Each of the fields labeled PK should be primary keys. These are generally AUTONUMBER fields. Each of the fields which are labeled FK are foreign keys. These are usually indexed Number fields of the type Integer. Your Primary Keys should be connected to your Foreign Keys in the 1 to many relationship.

Most of the times you will not need any other kind of joins. So the trick here is to create the tables with unique information. There should not be the repeated information in your database.The database that is reorganized in above manner is called as "normalized" database.

9 7 4
38,600 points

Related questions

0 votes
1 answer 2 views
2 views
Problem: Can anyone tell me the solution of this problem? How to create a macro in access?
asked 6 days ago Ifra 24.4k points
0 votes
1 answer 97 views
97 views
Problem: Currently I have a shared access application. I have basic knowledge in VBA. I have created the accde file for a 32-bit machine but when user tries to open the application then he or she is getting a below security warning: “Microsoft office has identified a potential security concern.” I want to know the way to disable the above message from appearing to the users.
asked Aug 29, 2020 Raphael Pacheco 4.9k points
0 votes
1 answer 116 views
116 views
Problem: Can anyone guide me with the right solution as I am new and learning database? Which of the following does not violate the referential integrity of a database? Inserting a new row into a table with a foreign key that doesn't match a primary key in ... related rows in all related tables Deleting a row in a foreign key table without deleting the related row in the related primary key table
asked Feb 17, 2020 maddi86 5.4k points
0 votes
1 answer 2 views
2 views
Problem: I need someone’s assistance to solve my problem .. it is possible to view all access objects in the navigation pane.
asked 2 days ago Ifra 24.4k points
0 votes
1 answer 2 views
2 views
Problem: Access does not use script files.
asked 2 days ago charles mathews 5.5k points
1 vote
1 answer 1 view
1 view
Problem: I hace written a code to search all records on a form . For this , I have created a txtSearch and a Button for the text box. The field I’m searching in the form is labeled Full_Name. When I try to search for a first name nothing happens , not ... = Null If Me.Recordset.NoMatch Then MsgBox "No record found", vbOKOnly + vbInformation, "Sorry" Me!TxtSearch = Null End If End If End Sub
asked 4 days ago Ashty 5.7k points
0 votes
1 answer 2 views
2 views
Problem: Please solve it … Because I am unable to find out the solution... how to set primary key in access
asked 6 days ago Ifra 24.4k points
0 votes
1 answer 3 views
3 views
Problem: I am stuck with this ... Please help me that how to deal with this error? how to make foreign key in access
asked Mar 24 Ifra 24.4k points
0 votes
1 answer 3 views
3 views
Problem : Any ideas on what I need to do to fix this? Thanks!-how to add a calculated field to a query in access?
asked Mar 15 Samiur1 38.4k points
0 votes
1 answer 4 views
4 views
Problem: I've been tasked with making updates to an MS Access Database and its forms. If I enter data into a text box on the form and then close the form without pressing the Save Record button a new record is still added to the Database which makes no sense to. Any insight would be great, I'm a programmer but have little experience working with Access Forms and Databases. Thanks
asked Mar 15 ummesalma 21.3k points