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 derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Correct command to insert or merge 1 Access table into another 1

Status
Not open for further replies.

vamoose

Programmer
Oct 16, 2005
320
MX
Could someone please direct me to the appropriate command to merge 1 Access 2000 table into an existing Access 2000 table. I am using DoCmd.TransferDatabase acImport to import the first table and now I want to insert a second into the existing first one.

Thank you for the advice.
 
By the way, both tables are exactly the same.
 
Provided the two tables have the same structure:
(SQL code)
INSERT INTO yourExistingTable
SELECT * FROM yourSecondTable IN "\path\to\database.mdb"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Something like this in Access 2000 VBA ?

DoCmd.RunSQL "INSERT INTO ABS_Daily SELECT * FROM ABS_Daily IN c:\temp\Table.mdb"

I get an error of: Syntax error in FROM clause.
 
Perhaps this ?
DoCmd.RunSQL "INSERT INTO ABS_Daily SELECT * FROM ABS_Daily IN [!]'[/!]c:\temp\Table.mdb[!]'[/!]"

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
THANK YOU, that worked great. You are awesome. Have a star.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top