Good afternoon
I would be extremely grateful if anyone gets the chance to look into the following error for me... (All based on Frm_Company on the attached db).
The following error occurs when leaving the top subform (SubFrm_Address) and entering the next sub form (SubFrm_Contacts).
'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
The annoying thing is I think I understand the message and what is happening but I have no clue how to stop it from occurring. When I enter the sub form from the main form the primary key is set (sets as soon as I have entered text into the first field). This is set to Index 'No Duplicates' in the Tbl_Company (which it needs to be as each company needs a unique ref).
On entering data into the fields on the sub form (which has the same record source as the main form, Qry_Company), I believe it then tries to create the key again?? I'm not sure why? I'm wondering whether it could have something to do with the record sources for the forms? I have the main form running off a query (Qry_Company) and the others from either the same query or a different table....
I am still fairly new to all this and I have to admit relationships are still something I am trying to get my head around .... could any point me in the right direction or explain where I am going wrong?? I hope I have explained it well enough and that someone can make some sense out of what I have said
I have posted a similar thread already earlier today however I think it is more appropriate in the 'Tables' section now rather than 'Forms'... so apologies if you have already read my previous post.
I would be extremely grateful if anyone gets the chance to look into the following error for me... (All based on Frm_Company on the attached db).
The following error occurs when leaving the top subform (SubFrm_Address) and entering the next sub form (SubFrm_Contacts).
'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
The annoying thing is I think I understand the message and what is happening but I have no clue how to stop it from occurring. When I enter the sub form from the main form the primary key is set (sets as soon as I have entered text into the first field). This is set to Index 'No Duplicates' in the Tbl_Company (which it needs to be as each company needs a unique ref).
On entering data into the fields on the sub form (which has the same record source as the main form, Qry_Company), I believe it then tries to create the key again?? I'm not sure why? I'm wondering whether it could have something to do with the record sources for the forms? I have the main form running off a query (Qry_Company) and the others from either the same query or a different table....
I am still fairly new to all this and I have to admit relationships are still something I am trying to get my head around .... could any point me in the right direction or explain where I am going wrong?? I hope I have explained it well enough and that someone can make some sense out of what I have said
I have posted a similar thread already earlier today however I think it is more appropriate in the 'Tables' section now rather than 'Forms'... so apologies if you have already read my previous post.