Watch out, Dale! If you did that without any further qualification, you'd
end up deleting some system tables. You need to exclude tables whose names
begin with "MSys".
Also, you would probably delete every other table/object.
Delete table #0
Table #1 moves to position #0
Advance to next table position
Table #2 is now in position 1
Delete table #2
Table #3 is now in position 1
Advance to position 2
Delete Table #4 which is in position 2
etc.
John Spencer
Access MVP 2002-2005, 2007-2008
The Hilltop Institute
University of Maryland Baltimore County
Also, you would probably delete every other table/object.
Delete table #0
Table #1 moves to position #0
Advance to next table position
Table #2 is now in position 1
Delete table #2
Table #3 is now in position 1
Advance to position 2
Delete Table #4 which is in position 2
There's some question in my mind whether using the DeleteObject, as Dale was
proposing, would have that effect or not, since he's looping through the
TableDefs collection but not using the collection's Delete method. I didn't
take the time to test it.
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.