I have a function that deletes all tables.i want to modigy the function so as to leave the atble TblCutdate undeleted.How can i do this ?
Public Function DeleteTables()
Dim dbs As DAO.Database
Dim i As Integer
Set dbs = CurrentDb
‘ Loop backwards through relations
For i = dbs.Relations.Count – 1 To 0 Step -1
dbs.Relations.Delete dbs.Relations(i).Name
Next i
‘ Loop backwards through tabledefs
For i = dbs.TableDefs.Count – 1 To 0 Step -1
If Left(dbs.TableDefs(i).Name, 4) “MSys” Then
dbs.TableDefs.Delete dbs.TableDefs(i).Name
End If
Next i
Set dbs = Nothing
End Function
-
Delete tables (Access 2000)
- This topic has 2 replies, 2 voices, and was last updated 18 years ago.
AuthorViewing 0 reply threadsAuthorViewing 0 reply threads