Saving empty file

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.
 
W

Wayne Morgan

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.
 
A

arthur

-----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
 

Ask a Question

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.

Ask a Question

Top