foxtrot123
Registered User.
- Local time
- Today, 01:53
- Joined
- Feb 18, 2010
- Messages
- 57
I use the following code to delete from a table all records except those meeting the WHERE criteria:
I'd like to run this exact same query, but on many other tables, all of which are stored in tblTablesToClean (TableID, TableName).
Does anyone know a good way to have Access loop through the list of tables in tblTablesToClean, each time passing the name of the table into the DELETE code and running the code, until all tables have been processed?
Thank you.
Code:
DELETE tblABC.*, tblABC.SubjectID
FROM tblABC
WHERE (((tblABC.SubjectID)<>99 And (tblABC.SubjectID)<>432));
Does anyone know a good way to have Access loop through the list of tables in tblTablesToClean, each time passing the name of the table into the DELETE code and running the code, until all tables have been processed?
Thank you.