Very seldom do I cross-post a message, but I think I previously put this question in the wrong forum.
I'm building a simple order management system using MS Access 97. The design uses several tables, but the three involved with this problem are: Customer, Orders, Order Details. There is a one-to-many relationship between Customer and Orders using CustomerID. There is also a one-to-many relationship between the Orders and Order Details, and a relationship between Orders and Payments. I use a Customer Form as the main form, with a nested Orders subform which summarizes relevant order information. The Orders form has a nested Orders Detail form used to collect order details.
After putting the thing together, I added some test data using the Customer form. It worked fine for the customer information. Then I added test data using the Order Details form. For the first three test customers, the system worked fine. But, when I attempted to enter order detail data for the fourth customer I received the following message when I tried to exit the form: "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."
None of the data field properties are set to prevent duplicates. The OrderID is Autonumber and a Primary Key. The index property of Orders and Order Details is set to Yes(No Duplicates).
I deleted the relationships. No help. I reinstalled the OrderID. Zilch. I redefined the index properties to permit dupes. Didn't help.
I cannot figure out why the first three sets of customer data and order data worked fine, but the fourth entry wasn't accepted. I don't understand whether the problem is originating in table data values, in the control properties, or in the index settings -- or somewhere else.
Any recommendations and suggestions to help me solve this problem is appreciated.
Thanks.
I'm building a simple order management system using MS Access 97. The design uses several tables, but the three involved with this problem are: Customer, Orders, Order Details. There is a one-to-many relationship between Customer and Orders using CustomerID. There is also a one-to-many relationship between the Orders and Order Details, and a relationship between Orders and Payments. I use a Customer Form as the main form, with a nested Orders subform which summarizes relevant order information. The Orders form has a nested Orders Detail form used to collect order details.
After putting the thing together, I added some test data using the Customer form. It worked fine for the customer information. Then I added test data using the Order Details form. For the first three test customers, the system worked fine. But, when I attempted to enter order detail data for the fourth customer I received the following message when I tried to exit the form: "The changes you requested to the table were not successful because they would create duplicate values in the index, primary key or relationship. Change the data in the field or fields that contain duplicate data, remove the index, or redefine the index to permit duplicate entries and try again."
None of the data field properties are set to prevent duplicates. The OrderID is Autonumber and a Primary Key. The index property of Orders and Order Details is set to Yes(No Duplicates).
I deleted the relationships. No help. I reinstalled the OrderID. Zilch. I redefined the index properties to permit dupes. Didn't help.
I cannot figure out why the first three sets of customer data and order data worked fine, but the fourth entry wasn't accepted. I don't understand whether the problem is originating in table data values, in the control properties, or in the index settings -- or somewhere else.
Any recommendations and suggestions to help me solve this problem is appreciated.
Thanks.