Copy Table - Structure Only

B

Brad

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
 
B

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
 
J

John Spencer

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
 
B

Brad

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
 

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