RE: How do I avoid key violations in append queries



I expect you might have duplicates in a field or fields that make up a unique
index or primary key. If this is the case then change your append query to a
totals append query.
--
Duane Hookom
Microsoft Access MVP


"Pitaofauck" wrote:

I am using Access 2007 in Access 2002 - 2003 file format. When I run an
append query from a table with 129 records, to a table with 0 records. I get
the following message:
Microsoft Office Access set 0 field(s) to Null due to a type conversion
failure, and didn't add 100 record(s) to the table due to key violations, 0
record(s) due to lock violations, and 0 record(s) due to validation rule
violations.

If I agreee to run the query anyway it appends 29 records to the new table.

.



Relevant Pages

  • Re: update query
    ... data is duplicate particularly the CDCnum, name, and housing. ... I am not sure if an update or append query will work. ... The primary key is what would allow you to do that. ... Rick Brandt, Microsoft Access MVP ...
    (microsoft.public.access.queries)
  • RE: Split table containing data..possible in this case?
    ... CONTACT_ID (Primary Key - Autonumber) ... link your spreadsheet as a table. ... Create an append query that will append records to the GroupCode table. ... Opened tbl C and given a primary key to ID ...
    (microsoft.public.access.gettingstarted)
  • Re: Key Violations in Append Queries
    ... Normally, if a primary key or other unique index is created, it is ... the design of the database requires uniqueness for the key involved. ... Whoever designed the database supposedly felt this was necessary. ... It may be that you should just omit this from the append query, ...
    (microsoft.public.access.queries)
  • RE: Split table containing data..possible in this case?
    ... CONTACT_ID (Primary Key - Autonumber) ... link your spreadsheet as a table. ... Create an append query that will append records to the GroupCode table. ... Opened tbl C and given a primary key to ID ...
    (microsoft.public.access.gettingstarted)
  • Re: Need to Normalize (Repost)
    ... You may want to use a two-field primary key consisting of Review_ID ... be using this union method on all of them to normalize the database. ... So once I get past the errors, I see that I simply use the Append query to ... Recommendation 1 ...
    (microsoft.public.access.modulesdaovba)