A
Acie
I use the following code below, to basically display all of
the tables that exist in the given database. But
inevitably, it display all of them except for one table
(not always the same table). Anyone know why ??? (If I run
the code twice, then all the tables are displayed and thus
deleted according to the expressed criteria). But I
shouldn't have to run this more than once!
(Actually I use the code and then I delete the tables that
match a certain criteria).
Code:
Dim tdf as Tabledef
Dim dbs as database
Set dbs=currentdb
With dbs
For each tdf in .Tabledefs
if tdf.Name like userid & "*" then
.tabledefs.delete tdf.name
end if
next tdf
End with
Any ideas???
Thanks,
Acie
the tables that exist in the given database. But
inevitably, it display all of them except for one table
(not always the same table). Anyone know why ??? (If I run
the code twice, then all the tables are displayed and thus
deleted according to the expressed criteria). But I
shouldn't have to run this more than once!
(Actually I use the code and then I delete the tables that
match a certain criteria).
Code:
Dim tdf as Tabledef
Dim dbs as database
Set dbs=currentdb
With dbs
For each tdf in .Tabledefs
if tdf.Name like userid & "*" then
.tabledefs.delete tdf.name
end if
next tdf
End with
Any ideas???
Thanks,
Acie