Don't Know Why I'm Getting Key Violation On Append Query

Don't Know Why I'm Getting Key Violation On Append Query

Post by Y3ZlZ2F » Thu, 13 Jan 2005 04:15:02


Access 2 K Version

I am getting a can't add due to key violations. The only field I have that
can't have duplicates is the [Order Number] field. I have searched my table
and cant find [Order Number] = 04101874 in the table but it won't allow me to
append this record.

I have also looked at the query. Every field from the tblActiveOrders is
matched up with a field from the table I am trying to append to which is
tblOrderHistory.

I have compacted and repaired both mdb's.

Any suggestions or direction on how to solve this would be greatly
appreciated.
 
 
 

Don't Know Why I'm Getting Key Violation On Append Query

Post by Ken Snell » Thu, 13 Jan 2005 05:02:53

Are you trying to append data into the primary key field?

--

Ken Snell
<MS ACCESS MVP>

 
 
 

Don't Know Why I'm Getting Key Violation On Append Query

Post by Y3ZlZ2F » Thu, 13 Jan 2005 06:33:08

It appears that I am.

Is there a work around for this??

Thanks for your response
 
 
 

Don't Know Why I'm Getting Key Violation On Append Query

Post by Ken Snell » Thu, 13 Jan 2005 09:54:53

A workaround...other than "don't append data into the primary field"? What
is the primary field -- an autonumber field? If yes, just leave it out of
the append query's SQL statement.

Otherwise, you'll need to post more information about the tables'
structures, the SQL statement of the query that you're using, etc.

--

Ken Snell
<MS ACCESS MVP>