Deleting all data from an Access database
Sometimes it may be necessary to delete all the data in a database
while retaining the table structure. If done manually, this job can
quickly become tedious. If your database has many tables, the
following code will clear all the data in a hurry.
Dim ctr As Container, doc As Document, db As Database
Set db = CurrentDB()
Set ctr = db.Containers!Tables
For Each doc in ctr.Documents
If Left$(doc.Name, 4) "MSys" Then 注释:Table is not a system table
db.Exe...[ 查看全文 ]