pbuethe
Returning User
- Local time
- Today, 05:25
- Joined
- Apr 9, 2002
- Messages
- 210
I have a form which is based on a query which contains 5 tables in a one-to-one relationship (tblHeader, tblPartA, tblTrimester1, tblTrimester2, tblTrimester3). In the query there is a relationship from CaseNbr of tblHeader to CaseNbr in each of the other tables. The form contains a tab control and there is a page for entering data for each table (other than tblHeader, which has a separate form). tblDrugs is a "many" side table, and another page of the tab control contains a subform based on tblDrugs. This was all working fine for a few days. Now the following happens:
The user enters data into the first 4 pages of the form. (Each page has code to take the user directly from the last field on one page to the first field on the next page.) Page 5 (containing the subform for tblDrugs) comes up automatically, but without setting the focus on the first entry field (a combobox). When the user clicks on the arrow of the combobox, she gets the message about "the record could not be added to the table because it would create duplicate values in the index, primary key, or relationship". Not only does this prevent entries into this subform, but also the tblTrimester2 and tblTrimester3 data (from pages 3 and 4 of the form) did not get saved.
I can't think of what I may have changed that would have caused this. I did notice that tblPartA and tblTrimester1 have a record with CaseNbr 0. Should I delete it? How could this have been created? Could it be related to these problems?
Another thing, it looks like it works for existing records that did not have this problem originally. I guess these were records that were entered before this started happening. But if you go back into the records that got this error it still occurs.
I appreciate any help. This needs to be fixed ASAP.
The user enters data into the first 4 pages of the form. (Each page has code to take the user directly from the last field on one page to the first field on the next page.) Page 5 (containing the subform for tblDrugs) comes up automatically, but without setting the focus on the first entry field (a combobox). When the user clicks on the arrow of the combobox, she gets the message about "the record could not be added to the table because it would create duplicate values in the index, primary key, or relationship". Not only does this prevent entries into this subform, but also the tblTrimester2 and tblTrimester3 data (from pages 3 and 4 of the form) did not get saved.
I can't think of what I may have changed that would have caused this. I did notice that tblPartA and tblTrimester1 have a record with CaseNbr 0. Should I delete it? How could this have been created? Could it be related to these problems?
Another thing, it looks like it works for existing records that did not have this problem originally. I guess these were records that were entered before this started happening. But if you go back into the records that got this error it still occurs.
I appreciate any help. This needs to be fixed ASAP.
Last edited: