Results 1 to 3 of 3
  1. #1
    Join Date
    Nov 2011
    Posts
    7

    Unanswered: append query without duplicate record

    Dorod (means Hi)

    i create a append query but every time i run this query records duplicate,

    i have a form and a button in form, user type required records in form and then press button, in event click button i have
    docmd.openquer "append query"

    but every time in table create duplicate records

    this is query SQL

    INSERT INTO tblKhahSend ( OrderCode, RecieveDate, LeadTime, OrderStatus, Description, KanbanName, QuaOfKanban, OrderDate, SendDate )
    SELECT tblKamRecieve.OrderCode, tblKamRecieve.RecieveDate, tblKamRecieve.LeadTime, tblKamRecieve.OrderStatus, tblKamRecieve.Description, tblKamRecieve.KanbanName, tblKamRecieve.QuaOfKanban, tblKamRecieve.OrderDate, tblKamRecieve.SendDate
    FROM tblKamRecieve;

    table tblKhahSend have a autonumber field(primary key)

    how fix it?

  2. #2
    Join Date
    Apr 2005
    Location
    Zagreb - Croatia
    Posts
    372
    I suggest !
    1) You don't need an append query for this. Link the form direct on tha table.
    2) Make any other field (or fields) as a PRIMARY KEY, (instead of an autonumber). Or put an INDEX (in the table) with properites UNIQUE = Yes.

  3. #3
    Join Date
    Nov 2011
    Posts
    7
    Quote Originally Posted by MStef-ZG View Post
    I suggest !
    1) You don't need an append query for this. Link the form direct on tha table.
    2) Make any other field (or fields) as a PRIMARY KEY, (instead of an autonumber). Or put an INDEX (in the table) with properites UNIQUE = Yes.

    i fix it, create a find unmatched query , then append it to destination table

    tnx alot

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •