Function KillTables()
Dim db As DAO.Database
Dim tdx As DAO.TableDefs
Dim i As Integer
Set db = CurrentDb()
Set tdx = db.TableDefs
For i = tdx.Count - 1 To 0 Step -1
If tdx(i).Name Like "*_Importfouten*" Then
Debug.Print "Deleting " & tdx(i).Name
tdx.Delete tdx(i).Name
End If
Next
End Function
--
Allen Browne - Microsoft MVP. Perth, Western Australia.
Reference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=7532
Tips for Access users -
http://allenbrowne.com/tips.htmlReference:: Sikh Philosophy Network http://www.sikhphilosophy.net/showthread.php?t=7532
Reply to group, rather than allenbrowne at mvps dot org.
"Henrootje"
wrote in message
news:1132151901.363830.119990@o13g2000cwo.googlegr oups.com...
>I would like to delete all tables in my database that have the string
> '_Importfouten' in their name.