Results 1 to 2 of 2
  1. #1
    securitywyrm is offline Advanced Beginner
    Windows 7 64bit Access 2010 64bit
    Join Date
    Mar 2013
    Posts
    97

    "You must populate the data of the primary key when appending between tables" <-- How?

    Hello all. I'm banging my head against a database I've inherted and don't have the authority to replace with a new properly built one. Thus I'm trying to run an append query between two tables, and get the "Cannot append 1275 record(s) due to validation rule violations" error.



    My googling has resulted in the following advice on several forums from other people encountering this error: "On appending from one table to another, you must ensure that you populate the columns that makeup the primary key of the destination table." However this doesn't make sense to me, as shouldn't an autonumber field... autonumber?

    To test this I created a simple database of two tables with four fields: An autonumber primary key field, and three data fields, one of which is also indexed (SSN, no duplicates). Even uploading only a single field (after removing the 'default value' in the indexed field) the autonumber continued to populate correctedly.

    Can someone help me to understand what it means by having to "populate the data of the primary key"? Shouldn't I be leaving that blank and letting the primary key autonumber populate itself?

  2. #2
    isladogs's Avatar
    isladogs is offline MVP / VIP
    Windows 10 Access 2010 32bit
    Join Date
    Jan 2014
    Location
    Somerset, UK
    Posts
    6,113
    Have you checked whether the PK field really is auto number?
    If it is, then you leave it to populate itself and will get an error if you try to populate it yourself.
    But if it isn't, you must populate it yourself.

    Another possible issue is where another field is required and you haven't assigned a value to that
    Colin, Access MVP, Website, email
    The more I learn, the more I know I don't know. When I don't know, I keep quiet!
    If I don't know that I don't know, I don't know whether to answer

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

Similar Threads

  1. Replies: 3
    Last Post: 09-21-2017, 05:40 AM
  2. Replies: 13
    Last Post: 12-12-2016, 12:26 AM
  3. Replies: 1
    Last Post: 09-07-2015, 08:00 AM
  4. Replies: 1
    Last Post: 08-23-2012, 08:32 AM
  5. Replies: 5
    Last Post: 06-19-2012, 03:16 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