Results 1 to 7 of 7
  1. #1
    naseerrahaman is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2013
    Location
    India
    Posts
    12

    Append unmatched query in Access

    ​Hi Team,




    I am trying to append the unmatched query but getting the error message as "Duplicate Output Destination".


    What actually am trying is to identify the unmatched line.
    Eg: in table "A" i have 2 records and in table "B" 3 records
    and i want to append/insert unmatched query result in table "A".


    Should compare or match between "Field1" in both the tables.


    I request you to kindly advise on this.


    Cross posted here "https://www.ozgrid.com/forum/index.php?thread/1231013-append-unmatched-query-in-access/&postID=1254662#post1254662"


    Thank you.


    Regards,
    Rehaman.
    Attached Files Attached Files

  2. #2
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    I do not see any query?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  3. #3
    naseerrahaman is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2013
    Location
    India
    Posts
    12
    Hi Welshgasman,

    Thank you for attending my post.

    Here is the attachment for your reference.

    thank you.

    regards,
    Rehaman.
    Attached Files Attached Files

  4. #4
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    This is your query
    Code:
    INSERT INTO A ( ID, Field1, Field2, Field3, Field1 )
    SELECT B.ID, B.Field1, B.Field2, B.Field3, A.Field1
    FROM B LEFT JOIN A ON B.[Field1] = A.[Field1]
    WHERE (((A.Field1) Is Null));
    This code appends one row?
    Code:
    INSERT INTO A ( ID, Field1, Field2, Field3 )
    SELECT B.ID, B.Field1, B.Field2, B.Field3
    FROM B LEFT JOIN A ON B.[Field1] = A.[Field1]
    WHERE (((A.Field1) Is Null));
    You were trying to append Field1 twice?
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  5. #5
    naseerrahaman is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2013
    Location
    India
    Posts
    12
    Hi Welshgasman,

    Thank you for the help but still i am getting same error message even after using the updated/suggested query.

    Please find the attached screen shots for your reference.

    Kindly advise.

    Thanks in advance for all your help and support.

    Regards,
    Rehaman.
    Attached Files Attached Files

  6. #6
    Join Date
    Jan 2017
    Location
    Swansea,South Wales,UK
    Posts
    4,858
    That is the same code you had before?
    It is telling you you are using Field1 twice?

    Paste my code in sql view, then switch back to Design view.

    See the difference?
    Attached Thumbnails Attached Thumbnails Capture.PNG  
    Please use # icon on toolbar when posting code snippets.
    Cross Posting: https://www.excelguru.ca/content.php?184
    Debugging Access: https://www.youtube.com/results?sear...bug+access+vba

  7. #7
    naseerrahaman is offline Novice
    Windows 10 Access 2013 64bit
    Join Date
    Feb 2013
    Location
    India
    Posts
    12
    Hi Welshgasman,

    Please accept my sincere apologies for the inconvenience caused.

    After removing field1 from append row just above the "is null", now it's working fine.

    Thank you once again for all your help and support.

    Regards,
    Rehaman.

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

Similar Threads

  1. help with an unmatched query..
    By willmafingerdo in forum Queries
    Replies: 5
    Last Post: 05-07-2020, 12:40 PM
  2. Unmatched Query & Append
    By thegrimmerdiscovery in forum Access
    Replies: 1
    Last Post: 04-05-2019, 09:26 AM
  3. 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
  4. Triple Exclude / "Unmatched" Query | Access 2010
    By DavidMichaelangelo in forum Queries
    Replies: 4
    Last Post: 04-17-2014, 03:43 PM
  5. Replies: 1
    Last Post: 12-08-2011, 01:52 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