Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Key violation error

Status
Not open for further replies.

Guest_imported

New member
Jan 1, 1970
0
0
0
Hello, I am trying to use an append query to append records to a table called "visit". However, Access gave me a key violation error. I went ahead and made a copy of the "visit" table and run the append query on the copy. It works fine. Both tables have the same format and data. The only differnce between the two is that the copy doesn't have any relatioship w/ other tables.

What do you guys think the cause is? Could the problem be possibly solve by setting cascade relationship ( I have no idea how to do that)? OR I have to configure the referential integrity settings in the SQL server..Please help me out, I am puzzled. B-(
 
If your table "Visit" have any relationship with another table, and you force referential integrity (sorry, but i don`t sure how translate "Integridad referencial"), you must put in the field who is part of the relation, one value who exist in the other table.

For Example: If you have one table "Employees" and one table "Countries". This tables have a relationship with the fields Employees.Country and Countries.IdCountry. When you want add one record in "Employees" table, you must put in the Country field, one value of the "Countries" table.

If you don't like that, modify the relationship (in the relationships windows), and in the properties page, don't select the force referential integrity option (Is the first option...)

Do you understand me?? (I don't speak english very well...)
bye. My e-mail is: vzudaire@yahoo.com
 
Veronica:
Thanks for the response.

I opened up the relationships window, how do I open up the properties page? I don't seem to find it. I tried right click but they only let me show table and save layout.

Thanks

Pizaro
 
Hello,
Open the relationships window, and then right click on the blak line (the relationship line) and select modify realtionship. This action open the properties page of the relationship.

good luck...
Vero.

My e-mail is: vzudaire@yahoo.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top