Hi Guys
I've searched the forum and can't find an answer to a tricky little situation that has arisen in our office.
Simply put, we have a table of "customers" who each have an autonumber Primary Key, (CustomerID). Every time a user places an order for a customer, this generates another Primary Key autonumber in a table called "Orders" called "OrdersID"
We have used this DB for almost ten years without any issues which I could not solve (with a little help from my friends on here) but now, somehow, we've ended up with TWO Primary Keys in the "Orders" which are the same number but have different Primary Keys from the "Customers" table. I can't see how this can happen as duplicates are not allowed in the OrdersID field.
Although I have deleted one of these orders, I cannot delete the other one. Any attempt to delete the other one returns: "The search key was not found in any record."
I realise that I've already deleted it when I deleted the other record but cannot find a way to get rid of this now defunct duplicate record.
If anyone can advise, I have two questions:
Firstly, what could cause this to happen?
Secondly, how do I get rid of the unwanted record?
Many, many thanks for your time, as always. I appreciate it!
:banghead:
I've searched the forum and can't find an answer to a tricky little situation that has arisen in our office.
Simply put, we have a table of "customers" who each have an autonumber Primary Key, (CustomerID). Every time a user places an order for a customer, this generates another Primary Key autonumber in a table called "Orders" called "OrdersID"
We have used this DB for almost ten years without any issues which I could not solve (with a little help from my friends on here) but now, somehow, we've ended up with TWO Primary Keys in the "Orders" which are the same number but have different Primary Keys from the "Customers" table. I can't see how this can happen as duplicates are not allowed in the OrdersID field.
Although I have deleted one of these orders, I cannot delete the other one. Any attempt to delete the other one returns: "The search key was not found in any record."
I realise that I've already deleted it when I deleted the other record but cannot find a way to get rid of this now defunct duplicate record.
If anyone can advise, I have two questions:
Firstly, what could cause this to happen?
Secondly, how do I get rid of the unwanted record?
Many, many thanks for your time, as always. I appreciate it!
:banghead: