D
Del
I'm trying to drop all tables from my database window except tblTemp. I have
tried the following code:
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
For Each obj In dbs.AllTables
If obj.Name <> tblTemp Then
DoCmd.RunSQL "Drop Table " & obj.Name
End If
Next obj
But this code returns more than I want. Things like MSysAccessObjects, etc.
How can I loop through only the tables listed in my db window?
tried the following code:
Dim obj As AccessObject, dbs As Object
Set dbs = Application.CurrentData
For Each obj In dbs.AllTables
If obj.Name <> tblTemp Then
DoCmd.RunSQL "Drop Table " & obj.Name
End If
Next obj
But this code returns more than I want. Things like MSysAccessObjects, etc.
How can I loop through only the tables listed in my db window?