Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Transfer data from table a to b 1

Status
Not open for further replies.

kennetha

Programmer
Sep 10, 2003
105
0
0
MT
Hi All,

Is it possible to transfer all table data from a table to another by using DAO? All fields are the same for the two tables.

Some Vba code appriciated.

Thanks
Kenneth
 
You can do this using an INSERT query.

Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Have no idea how to INSERT query with DAO
 
No problem [smile]

You can run a SQL string using
Code:
DoCmd.RunSQL()

The basic syntax for an INSERT in your situation is:
Code:
INSERT INTO Table1
SELECT Table2.*
FROM Table2;
Hope this helps

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Glad I could help, thanks for the star [smile]

HarleyQuinn
---------------------------------
The most overlooked advantage to owning a computer is that if they foul up there's no law against wacking them around a little. - Joe Martin

Get the most out of Tek-Tips, read FAQ222-2244 before posting.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top