N/APosted on - 08/05/2011
Hi people of techyv!
Please allow me to share my experience here in techyv. While I was using Microsoft Access, I met a strange error. Please see below the error message.
You have violated the primary key.
As I read on the error, it makes me think twice, such a short error message "You have violated the primary key", that is why I have a hard time figuring out what went wrong. When I looked for same error message over the internet, none was posted as what I have. I am asking for some help on this error message. I am hoping to hear your ideas. Thanks.
You have violated the primary key
When your table has a primary key defined, it is a rule that the value for the primary key must be unique for all the records in the table. So if you are getting the message “You have violated the primary key”, it only means that you attempted to input a value that already exist in the primary key field.
If you do not know what the primary key for the table is, look at the table definition and see which field is defined as the primary key. Then you can check the values inputted in the primary key and make sure that each value that entered will not cause a duplicate entry for the particular field.