Results 1 to 3 of 3
  1. #1
    ChobeyGuddu is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2016
    Posts
    29

    Append query without duplication

    HI All,
    I am looking for solution to Append my query without duplication...

    Actually, I have created a database which will be used by 10-15 employees, it has a data entry form where I have 2 dates :

    1) Program Completion date
    2) Rework on Program date

    IF a Program Completion date is claimed (means entered), which means program is complete but in some cases we have to redo some work on the same program - so in that case I want to record my old data in another sheet before we start with rework on Program.

    I thought it can be done by Append query to append existing data on new table with Query Criteria on Rework on Program date >=Date()
    But every time someone, enter a Date in "Rework on Program date" - it will run a code and add the data to table - which means it will also add another data again which is entered on the same day for another Program...



    Can you pls help me with the solution - I might be working on completely wrong direction... so pls guide me as well if that's the case.


    Sample data: attached

    Click image for larger version. 

Name:	Question.PNG 
Views:	15 
Size:	9.0 KB 
ID:	27154
    Last edited by ChobeyGuddu; 01-21-2017 at 02:48 PM. Reason: some amendments

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,525
    Make a query that pulls existing records.
    You can make the append query that uses this query to only append the missing recs.
    use an outer join to only get records that DONT exist in the target table.

  3. #3
    ChobeyGuddu is offline Novice
    Windows XP Access 2003
    Join Date
    Oct 2016
    Posts
    29
    Hi Ranman,
    Thanks for response... but still unclear...

    Created an Append query & running it when the criteria is true (basically its when rework date is entered on reworkonprogramdate).
    I have created a Table (tblRework) and added fields which is require to append the data there...

    To run the Append query I have added below code to reworkonProgramdate - after update event

    Private Sub ReworkonProgramdate_AfterUpdate()
    DoCmd.SetWarnings False

    MsgBox ("(REWORK) - Copying Existing Record to another Sheet")
    DoCmd.OpenQuery "REWORK", acNormal, acEdit
    DoCmd.SetWarnings True
    End Sub

    But the issues are :
    1) When more than 1 employees are accessing it and adding a rework date to it - it will run multiple time and create a duplicate entry on Append table (tblRework).
    2) We know its running the query but its not appending data to the tblrework for some reason until i run it second time (manually).

    Can you pls elaborate on these fronts pls ?

    Thanks in advance,
    Chobey Guddu

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

Similar Threads

  1. Access can't append all the records in the append query
    By fluffyvampirekitten in forum Access
    Replies: 2
    Last Post: 08-27-2015, 01:53 AM
  2. Query Duplication
    By Lois in forum Queries
    Replies: 1
    Last Post: 11-22-2011, 08:47 AM
  3. Replies: 1
    Last Post: 10-06-2011, 08:37 AM
  4. Replies: 7
    Last Post: 07-21-2011, 01:01 PM
  5. Query duplication issues
    By MiCCAS in forum Queries
    Replies: 1
    Last Post: 02-18-2010, 11:31 AM

Tags for this Thread

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