Results 1 to 2 of 2
  1. #1
    dhicks19 is offline Novice
    Windows 7 64bit Access 2007
    Join Date
    Apr 2012
    Posts
    17

    Append query creating duplicates

    Hi there, I have a table called tblplan - it contains checks that need to be repeated and create a works order from them, every monday the date is updated on some of the checks in tblplan depending on the frequency set in another table but some of the dates remain unchanged and will be the same as the last time it ran. It appends the data to tblpanwo, this is where the users can edit the data, sign it off etc etc.

    My issue is that for the checks with the date that remains unchanged as last time it ran in tblplan, it will be appended again to tblplanwo, it will be exactly the same check for exactly the same data, just different works order id as this is autonumber field.

    In tblplan the primary keys are works order id, works order date,asset number, and task code.

    The works order date,asset number and task code is appended from the tblplan to tblplanwo - why is it appending them twice if the primary keys are already there.

    Any help will be greatly appreciated.



    Heres my database to get an idea - if you look at frmmondayloop, all the queries are in there that operate the tblplan scheduling
    New PPM (2).zip

    thanks

  2. #2
    ssanfu is offline Master of Nothing
    Windows 2K Access 2000
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    <snip>... just different works order id as this is autonumber field.
    FYI, using an autonumber field as a WO number is a bad idea. IMO, this should be fixed first...
    See http://access.mvps.org/access/general/gen0025.htm
    Also, see #7 at http://access.mvps.org/access/tencommandments.htm

    Since I don't have A2K7, I can't open your database, so I can't comment on the reason for the duplication.

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

Similar Threads

  1. Creating an Update/Append Query
    By Jray9242 in forum Import/Export Data
    Replies: 2
    Last Post: 04-23-2012, 06:31 PM
  2. Replies: 10
    Last Post: 03-01-2012, 11:31 PM
  3. Replies: 1
    Last Post: 10-06-2011, 08:37 AM
  4. Replies: 7
    Last Post: 07-21-2011, 01:01 PM
  5. Replies: 1
    Last Post: 03-23-2010, 04:01 PM

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