Results 1 to 6 of 6
  1. #1
    AlliCrader is offline Novice
    Windows 7 64bit Access 2016
    Join Date
    Jul 2017
    Posts
    12

    Append Query multiples appending. HELP

    Click image for larger version. 

Name:	Capture.PNG 
Views:	18 
Size:	12.6 KB 
ID:	29705



    I am trying to create an append query that will only append data based on a like criteria and if one of my fields is not in the table(which they should not be in there to begin with). The problem is, it is appending the records multiple times and I don't know how to fix this. Please help.

  2. #2
    JoeM is offline VIP
    Windows 7 32bit Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    I have a feeling that the issue is with the underlying data source (RMA).
    Try changing your Append Query to a Select Query and play around with it until you have the correct number of records displaying that should be added to the Table.

  3. #3
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    it is appending the records multiple times.
    What does this mean, exactly? That each time you run it, it appends records that are already there, or in one execution it adds multiple identical records? I don't get this either
    if one of my fields is not in the table(which they should not be in there to begin with)
    If the field is not there, how can your query add data to it? I think you mean if a table field doesn't have values in it that your query is trying to append, then it should append, otherwise, it should not.

    What is RMA - a table, or query?
    Last edited by Micron; 07-28-2017 at 04:24 PM. Reason: added question
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

  4. #4
    ssanfu is offline Master of Nothing
    Windows 7 32bit Access 2010 32bit
    Join Date
    Sep 2010
    Location
    Anchorage, Alaska, USA
    Posts
    9,664
    FYI: you have spaces and special characters in your field names.

    Some suggestions:
    Use only letters and numbers (exception is the underscore) for object names.
    Do not use spaces, punctuation or special characters in object names.
    Do not use look up FIELDS, multi-value fields or calculated fields in tables.
    Do not begin object names with a number.
    ------------------
    Bad field name: "RMA #" (has the hash mark and a space)
    Good/better field names: "RMANum", "RMA_Num", "RMA_Number"


    (The hash mark (#) in Access is a date delimiter)

  5. #5
    John_G is offline VIP
    Windows 7 32bit Access 2010 32bit
    Join Date
    Oct 2011
    Location
    Ottawa, ON (area)
    Posts
    2,615
    Your query is going to copy all matching records each time you run it. This will result in duplication in the destination table unless you delete the records after copying them. Your criteria says "MOVE TO EXPIRED", but your query does not "move" records - it only copies them. You need a second, Delete query which you would run AFTER the first one.

  6. #6
    Micron is offline Very Inert Person
    Windows 7 32bit Access 2007
    Join Date
    Jun 2014
    Location
    Ontario, Canada
    Posts
    13,423
    Table fields that don't allow duplicates can also prevent duplicate records. Use the .Execute method to run the query to avoid warning messages. A gram of prevention is worth a kilo of cure.

    That's if the duplicates are in the same table. No answer to that yet?
    The more we hear silence, the more we begin to think about our value in this universe.
    Paraphrase of Professor Brian Cox.

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

Similar Threads

  1. Replies: 4
    Last Post: 08-09-2016, 06:07 AM
  2. Replies: 1
    Last Post: 04-10-2016, 09:50 AM
  3. Query to pull multiples of same data from a table
    By mpreston14 in forum Queries
    Replies: 1
    Last Post: 05-24-2013, 02:01 AM
  4. Replies: 1
    Last Post: 03-13-2013, 10:37 PM
  5. Replies: 2
    Last Post: 01-17-2012, 10:15 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