Results 1 to 2 of 2
  1. #1
    scr5jo is offline Novice
    Windows 7 64bit Access 2013
    Join Date
    Aug 2015
    Posts
    1

    Delete records from a table where records match criteria in another table

    Hi,



    I want to delete some records in a table where there is a match on a field in that table to a field in another table.
    here is my sql code, but access is not accepting it,

    DELETE FROM [20 Demand with identifier]
    WHERE [20 Demand with identifier].CustomerVendor
    IN (
    SELECT [15 CustomerVendor].CustomerVendor
    );

    can anyone help me get the correct code?

  2. #2
    June7's Avatar
    June7 is offline VIP
    Windows 7 64bit Access 2010 32bit
    Join Date
    May 2011
    Location
    The Great Land
    Posts
    52,930
    DELETE FROM [20 Demand with identifier]
    WHERE [20 Demand with identifier].CustomerVendor
    IN (SELECT [15 CustomerVendor].CustomerVendor FROM [15 CustomerVendor]);
    How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.

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

Similar Threads

  1. Delete does not delete records in evey table
    By LaughingBull in forum Access
    Replies: 5
    Last Post: 09-01-2015, 04:05 PM
  2. Replies: 1
    Last Post: 08-18-2014, 07:55 AM
  3. Replies: 4
    Last Post: 12-30-2013, 01:49 PM
  4. Replies: 5
    Last Post: 01-24-2012, 06:19 PM
  5. Replies: 2
    Last Post: 01-24-2012, 02:16 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