I should have said this in the first instance... this kind of operation
is expected to result in significant database bloat, so you better make
sure you compact regularly! If this is a monolithic database, setting
the Compact On Close option (Tools > Options, tab "General") will do it
just fine.
On second thought, you could achieve the same result by just deleting
all records from the table rather than the table itself:
CUrrentDb.Execute "DELETE * FROM MyTable", dbFailOnError
I suspect this might result in somewhat less bloat, especially for small
tables (few records), but you'll still need to compact regularly; if the
record numbers are high, the difference in bloat would be insignificant.
Nikos
|