.AddNew Duplicate entry error

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

When I add a new record to a table with the .addnew method I receive the error
"The changes you requested to the table were not successful because they would create duplicate values in the index, primary key, or relationship." The only two fields that are going to be added are the
JobID and the ApptID and they are both required. I walked
through the code and both of those values are generated and the JobID (the only unique value)
is indeed a new ID. There are no additional indices on the table to interfere.
I have a basically duplicate .AddNew statement for the Confirmation on the same form that
works just fine. Any suggestions?

Thanks

Dan
 
What is the primary key of the table?

What other (non-PK) indexes are defined on it (if any)?

What are the exact fields & values in the .Addnew statement?

TC


Daniel Dickover said:
When I add a new record to a table with the .addnew method I receive the error
"The changes you requested to the table were not successful because they
would create duplicate values in the index, primary key, or relationship."
The only two fields that are going to be added are the
 
As usually happens after a bit of thinking I figured it out (your reply sparked my solution.)
The problem was that I had my primary key as a text field although I was numbering it.
I changed the data type and it ordered correctly and resolved the problem.

Thanks for your help.

Da
 
Back
Top