I am getting the following error in my database: The changes you requested to the table were not successful because they would create duplicate values in teh 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.
Here is my code:
Dim JobProposal as DAO.Recordset
Dim db as database
Set db = CurrentDB()
Set JobProposal = db.OpenRecordset("SELECT * FROM JobProposal"*
JobProposal.AddNew
JobProposal.fields("Job_ID"
= Job_ID
JobProposal.fields("InvoiceType_ID"
= cboInvoiceType.Value
<<adding fields to the table>>
JobProposal.Update
I can't figure out why I am getting this error. In my JobProposal table, I only have one index value, JobProposal_ID which is set to an AutoNumber. I went through all of the values in my table and set them all to be indexed with "Duplicates OK". There aren't even any JobProposals with the same Job_ID. I have removed all of the table relationships (in the table relationship wizard) that involve the JobProposal table. Can anyone help me figure out why I am getting this error message? Thanks!
Here is my code:
Dim JobProposal as DAO.Recordset
Dim db as database
Set db = CurrentDB()
Set JobProposal = db.OpenRecordset("SELECT * FROM JobProposal"*
JobProposal.AddNew
JobProposal.fields("Job_ID"
JobProposal.fields("InvoiceType_ID"
<<adding fields to the table>>
JobProposal.Update
I can't figure out why I am getting this error. In my JobProposal table, I only have one index value, JobProposal_ID which is set to an AutoNumber. I went through all of the values in my table and set them all to be indexed with "Duplicates OK". There aren't even any JobProposals with the same Job_ID. I have removed all of the table relationships (in the table relationship wizard) that involve the JobProposal table. Can anyone help me figure out why I am getting this error message? Thanks!