Results 1 to 7 of 7
  1. #1
    skferranti is offline Novice
    Windows 10 Access 2021
    Join Date
    Feb 2023
    Posts
    4

    appending records to another database


    I have 2 databases that are the exact same and would like to append records from one to the other. I created a query to append all the fields and set the criteria to chose the records I want and saved it as an action query. when i tested the query it returned the records i want but when i run it as action i get the error message:

    Microsoft Office Access can't append all the records in the append query.

    Microsoft Office Access set 0 field(s) to Null due to a type conversion failure, and it didn't add 1 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.
    Do you want to run the action query anyway?
    To ignore the error(s) and run the query, click Yes.
    For an explanation of the causes of the violations, click Help.

    I don't know what to do. the 2 tables are exactly the same. My reason is that i want to keep the Master Database on the system at work and be able to add the new record i created while traveling

  2. #2
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    If you look at the error message, it is telling you one record has a key violation which could be due a duplicate pk

  3. #3
    Micron is offline Virtually Inert Person
    Windows 10 Access 2016
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    12,800
    Why do this? Maybe link to this table from the other db? If you try to manage 2 tables containing the same info, not only is it more work than is necessary, it's sure to become out of sync.
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    skferranti is offline Novice
    Windows 10 Access 2021
    Join Date
    Feb 2023
    Posts
    4

    What is a PK

    Quote Originally Posted by CJ_London View Post
    If you look at the error message, it is telling you one record has a key violation which could be due a duplicate pk
    Thanks CJ, in looking at the 3 records, they are all different in every field. what is a PK

  5. #5
    skferranti is offline Novice
    Windows 10 Access 2021
    Join Date
    Feb 2023
    Posts
    4
    CJ, i went in and tried this same thing with just one record and got the same message

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,927
    Quote Originally Posted by skferranti View Post
    Thanks CJ, in looking at the 3 records, they are all different in every field. what is a PK
    PK Primary Key
    FK Foreign Key

  7. #7
    CJ_London is offline VIP
    Windows 10 Access 2010 32bit
    Join Date
    Mar 2015
    Posts
    11,424
    they are all different in every field
    perhaps in your destination table one of the fields is indexed - no duplicates. Or you have a multi field index on two or more of the fields set as indexed - no duplicates. In either case, if that already exists in your table you will get that error.

Please reply to this thread with any new information or opinions.

Similar Threads

  1. Lookup before appending records
    By JennyL in forum Access
    Replies: 1
    Last Post: 06-12-2018, 04:12 PM
  2. Appending only records which have changed.
    By Miquel1 in forum Queries
    Replies: 3
    Last Post: 01-10-2014, 08:25 AM
  3. Message before Appending Records
    By Lorlai in forum Programming
    Replies: 3
    Last Post: 03-19-2013, 04:51 PM
  4. Appending inventory records with current price records
    By sberti in forum Database Design
    Replies: 8
    Last Post: 11-29-2012, 10:24 PM
  5. Key violation when appending records
    By slaterino in forum Programming
    Replies: 10
    Last Post: 08-26-2010, 08:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Other Forums: Microsoft Office Forums