Saving empty file

  • Thread starter Thread starter Arthur
  • Start date Start date
A

Arthur

What's the quickest and easiest way to create an empty (no
data) copy of an Access file. In other words, I want all
the structure but no data.
 
Workspaces(0).CreateDatabase "C:\Test.mdb", dbLangGeneral, dbVersion40

DoCmd.TransferDatabase acExport, "Microsoft Access" , "C:\Test.mdb", acTable, "Table1",
"Table1", True

You will need to loop through the objects in the database to export all of them. The True
at the end of the second line tell Access to export the structure only. The first line
creates an empty database file.
 
-----Original Message-----
Workspaces(0).CreateDatabase "C:\Test.mdb", dbLangGeneral, dbVersion40

DoCmd.TransferDatabase acExport, "Microsoft
Access" , "C:\Test.mdb", acTable, "Table1",
"Table1", True

You will need to loop through the objects in the database
to export all of them. The True
 
Back
Top