You can loop through the table defs in reverse as long as you can identify the tables you want to delete:
Dim tbl As Table
Dim dbs As DAO.Database
Dim intCount As Integer
Set dbs = CurrentDb
For intCount = dbs.Tabledefs.Count - 1 To 0 Step -1
Set tbl = dbs.TableDefs(intCount)
If tbl.Name IN (Deletable Tables) Then
dbs.TableDefs.Delete tbl.Name
End If
Set tbl = Nothing
Next intCount
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.