Copy Table - Structure Only

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Thanks for taking the time to read my question.

I'm wondering if you can copy a table with code into the same db, but
structure only.

I found docmd.copyobject, but there is no option for structure only.

Thanks,

Brad
 
Here's an idea: Use a Make Table query on the table you want to copy, and
make sure that the query returns no data.

Good Idea?

Bad Idea?

Brad
 
Try something like this. I did this in an Access97 database, but haven't
tried it in a later version.

DoCmd.TransferDatabase acExport, "Microsoft Access", CurrentDB().Name,
acTable, "2005Source", "2006Source", True

This copied the structure of the existing table 2005Source into a new table
named 2006Source
 
SWEET!!!

I had a bunch of code... at least 20 lines to get this done. One line is
way better, and your idea is way more reliable.

Thanks!

Brad
 
Back
Top