Results 1 to 4 of 4
  1. #1
    Jessica240 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    95

    Need to delete some records

    Hello! Let's get this party started....

    I have 2 tables that have a list of procedures and the price we charge for each procedure - neither table has duplicates. One table is my master table which is huge. The other table is a much smaller table, that consists of only the records that I need deleted from the master table (there are about 2,000 records that need deleted).

    My goal is to find the easiest way to delete all of the records from the master table if they match the records in the smaller table.


    So my plan was to link the 2 tables by the procedure ID and run a select query that would only show me the records from the Master table if they matched the records in the smaller table. So I designed that query, and it was successful. When I look at the data sheet view, it displays all the records I want to delete...... Bingo. Just what I wanted.


    BUT then when I go to delete them, Access won't let me. Usually when I run a select query Access will let me edit the records in the datasheet view. I'm assuming the reason why it won't let me edit them now is because I have a relationship created between the two tables.

    How do I get around this?



    Thank you!!!

    Jessica

  2. #2
    Jessica240 is offline Advanced Beginner
    Windows 7 32bit Access 2010 32bit
    Join Date
    May 2014
    Posts
    95
    Nevermind everyone... I made the procedure the primary key and so now all is good!!!

  3. #3
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Do you have a Unique ID field in the table you wish to Delete records from (i.e. an Autonumber field)?
    Can you post the SQL code of your SELECT query that identifies the records you want to delete (just change your Query to "SQL View" and copy and paste code here)?

  4. #4
    JoeM is offline VIP
    Windows XP Access 2007
    Join Date
    Jun 2012
    Posts
    3,904
    Sorry, didn't see your post as I was typing up my reply.

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

Similar Threads

  1. Replies: 2
    Last Post: 11-08-2017, 09:04 AM
  2. Replies: 7
    Last Post: 11-08-2013, 03:34 AM
  3. Replies: 2
    Last Post: 01-24-2012, 02:16 PM
  4. Can't delete records
    By joe1987 in forum Forms
    Replies: 1
    Last Post: 12-01-2011, 06:28 PM
  5. #delete records
    By supernova122 in forum Access
    Replies: 0
    Last Post: 07-08-2009, 08:41 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