Add Table fields from one table to another

M

MEG

I want to automate a process.

I have 10 fields (the entire table) that I want to copy and paste into
another table. Is there a way to automate this process. To clairify, I only
care about copying the design structure not any data.

The end result is that I would like to be able to incorporate this into a
macro, so I could place all the steps for the process together. Currently I
have to do 2 update queries, do this manual copy and paste of the structure
and then do the final 3 update queries.

I appreciate any ideas.
 
K

Ken Snell [MVP]

You can use the TransferDatabase action in a macro to copy the table
structure within the same database file:

Action: TransferDatabase
Transfer Type: Import
Database Type: Microsoft Access
Database Name: =CurrentProject.Path & "\" & CurrentProject.Name
Object Type: Table
Source: NameOfOriginalTable
Destination: NameOfNewTable
Structure Only: Yes
 
J

John Vinson

I want to automate a process.

I have 10 fields (the entire table) that I want to copy and paste into
another table. Is there a way to automate this process. To clairify, I only
care about copying the design structure not any data.

The end result is that I would like to be able to incorporate this into a
macro, so I could place all the steps for the process together. Currently I
have to do 2 update queries, do this manual copy and paste of the structure
and then do the final 3 update queries.

I appreciate any ideas.

A MakeTable query will create a new table... but this should very
rarely be necessary! Why do you feel that you need to create a new
table in the first place? If you're making the (very common) mistake
of assuming that you must have data in a single Table in order to
report it, *you don't*: a Report can be based on a Select Query, or on
several linked select queries.

Perhaps you could explain why you are going through this rather
elaborate and timeconsuming process!

John W. Vinson[MVP]
Join the online Access Chats
Tuesday 11am EDT - Thursday 3:30pm EDT
http://community.compuserve.com/msdevapps
 
Top