How to copy a table structure using code

G

Guest

I am using Access 2002 and need to find out how to copy a table structure ( the structure only, not the data) using code. I tried the docmd.CopyObject command to copy the table but it also copies the data too, but I only want the table structure itself

Any help on this would be greatly appreciated !
 
G

Graham R Seach

DoCmd.TransferDatabase acExport, "Microsoft Access", _
CurrentDb.Name, acTable, "tblMyTable", "tblMyNewTable", True

Regards,
Graham R Seach
Microsoft Access MVP
Sydney, Australia

lab said:
I am using Access 2002 and need to find out how to copy a table structure
( the structure only, not the data) using code. I tried the
docmd.CopyObject command to copy the table but it also copies the data too,
but I only want the table structure itself.
 

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