G Guest May 31, 2007 #1 I am unable to figure out how to tell the query which table I want to delete the records from.
J John Spencer May 31, 2007 #2 Could you post the SQL of the query that is not working? And tell us which table you want the records to be deleted from? DELETE FROM TableA WHERE TableA.SomeField in (SELECT BField FROM TableB WHERE Fieldz = 22) Another method that may work DELETE DistinctRow TableA.* FROM TableA INNER JOIN TableB ON TableA.XX = TableB.XX WHERE TableB.Fieldz = 22 -- John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County ..
Could you post the SQL of the query that is not working? And tell us which table you want the records to be deleted from? DELETE FROM TableA WHERE TableA.SomeField in (SELECT BField FROM TableB WHERE Fieldz = 22) Another method that may work DELETE DistinctRow TableA.* FROM TableA INNER JOIN TableB ON TableA.XX = TableB.XX WHERE TableB.Fieldz = 22 -- John Spencer Access MVP 2002-2005, 2007 Center for Health Program Development and Management University of Maryland Baltimore County ..
G Guest Jun 2, 2007 #3 My assumption is that you know what to delete so why not reference it directly in the deletequery statement. When dragging the fields to the grid just place the criteria in the selected field.
My assumption is that you know what to delete so why not reference it directly in the deletequery statement. When dragging the fields to the grid just place the criteria in the selected field.