aziz rasul
Active member
- Local time
- Today, 02:00
- Joined
- Jun 26, 2000
- Messages
- 1,935
I am trying to delete all the tables in my database, except for the system tables of course. How do I amend the code below so that ignores the system tables?
At the moment, it does not understand "MS*".
Private Sub Command88_Click()
Dim x As Integer
Dim dbs As Database
Dim tdfcount As Integer
Dim index As Integer
Set dbs = CurrentDb
tdfcount = dbs.TableDefs.Count
For index = 0 To tdfcount - 1
If dbs.TableDefs(index).Name = "MS*" Then
Else
DoCmd.DeleteObject acTable, dbs.TableDefs(index).Name
End If
Next index
End Sub
At the moment, it does not understand "MS*".
Private Sub Command88_Click()
Dim x As Integer
Dim dbs As Database
Dim tdfcount As Integer
Dim index As Integer
Set dbs = CurrentDb
tdfcount = dbs.TableDefs.Count
For index = 0 To tdfcount - 1
If dbs.TableDefs(index).Name = "MS*" Then
Else
DoCmd.DeleteObject acTable, dbs.TableDefs(index).Name
End If
Next index
End Sub