Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsFormsForms ProgrammingQueriesModules / DAO / VBAReports / PrintingMacrosDatabase DesignSecurityConversionImporting / LinkingSQL Server / ADPMultiuser / NetworkingReplicationSetup / ConfigurationDeveloper ToolkitsActiveX ControlsNew UsersGeneral 1General 2
Access DirectoryToolsTutorialsUser Groups
Related Topics
SQL ServerOther DB ProductsMS OfficeMore Topics ...

MS Access Forum / Modules / DAO / VBA / December 2005

Tip: Looking for answers? Try searching our database.

Copy Table - Structure Only

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Brad - 06 Dec 2005 19:29 GMT
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
Brad - 06 Dec 2005 19:37 GMT
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

> Thanks for taking the time to read my question.
>
[quoted text clipped - 6 lines]
>
> Brad
John Spencer - 06 Dec 2005 20:41 GMT
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

> Thanks for taking the time to read my question.
>
[quoted text clipped - 6 lines]
>
> Brad
Brad - 06 Dec 2005 20:58 GMT
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

> Try something like this.  I did this in an Access97 database, but haven't
> tried it in a later version.
[quoted text clipped - 15 lines]
> >
> > Brad
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.