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

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

Guest

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.
 
It appears that I am.

Is there a work around for this??

Thanks for your response

Ken Snell said:
Are you trying to append data into the primary key field?

--

Ken Snell
<MS ACCESS MVP>

cvegas said:
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.
 
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>

cvegas said:
It appears that I am.

Is there a work around for this??

Thanks for your response

Ken Snell said:
Are you trying to append data into the primary key field?

--

Ken Snell
<MS ACCESS MVP>

cvegas said:
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.
 
Back
Top