Results 1 to 2 of 2
  1. #1
    mgilbert86 is offline Novice
    Windows 7 32bit Access 2013
    Join Date
    May 2015
    Posts
    9

    Question Delete Query for Tables with Relationships

    Hello,



    I am trying to develop a delete query (create->query design method). I have two tables utilized in the query, that have a relationship built with join property on two fields of : 1. Only include rows where the joined fields from both tables are equal. I am trying to essentially have Access delete any record in Table 1 where there is a match for these two fields found in the Table 2. It says an error of Specify the table containing the records you want to delete. What needs to be specified in the fields used in query section to have the query run as I intended?

    Thanks

  2. #2
    ranman256's Avatar
    ranman256 is offline VIP
    Windows Vista Access 2010 32bit
    Join Date
    Apr 2014
    Location
    Kentucky
    Posts
    9,521
    the relations ship must have the setting, cascade delete

    the delete query cannot be done like a regular select query,
    it must be done like a FIND DUPLICATES query. Use the query wizard to make a FIND DUPLICATES query.
    Look at the design, it uses a IN subquery method on the common field.
    make your delete query similar.

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

Similar Threads

  1. VBA to delete all relationships
    By boboivan in forum Access
    Replies: 10
    Last Post: 03-31-2016, 11:38 AM
  2. Query to delete across tables
    By Gauchey in forum Queries
    Replies: 7
    Last Post: 07-17-2015, 12:49 PM
  3. Replies: 5
    Last Post: 02-19-2014, 11:50 AM
  4. Replies: 12
    Last Post: 04-25-2013, 01:32 PM
  5. Replies: 3
    Last Post: 07-16-2010, 12:32 PM

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