Creating a Delete Query

CassandraB

Registered User.
Local time
Today, 21:37
Joined
Feb 23, 2003
Messages
54
In Access2000 I would like to create a delete query using as criteria a table of selected records to delete from two other tables.

Table #1 lists only the specific serial numbers that I would like use as the criteria. And the other two tables are Inventory and History. All have the serial number in common. The Inventory table has 200 records but the History has about 2000 (because there are multiple records for each serial number).

I've tried to create the delete query but with no success. I am limited in my knowledge of creating queries and would greatly appreciate anyones help. Thanks!
 
The easiest way (for me) to create all but the simplest action queries is to start by making a "normal" select query, seeing if it works, then changing it to an action query by going to the Query menu and choosing the type you want. In your case, choose Delete Query. That way, you can be sure your record selections are correct before you attempt to perform the deleting of records. Also, it's a good idea to back up these tables before you proceed - just in case.

In order to select the proper records, you want to get all records from Table1 that match records in your Inventory table, then you want to select all records from Table1 that have a match in the History table. Just add both Table1 to the query grid, then add the Inventory table and drag a join line between the serial number fields. Open the select query to make sure your records were properly selected, then follow the steps above to change it to a delete query.
 

Users who are viewing this thread

Back
Top Bottom