Append 2 tables with variable names

  • Thread starter Thread starter ambushsinger
  • Start date Start date
A

ambushsinger

Hi there...
Here's my problem.
I have 2 tables in an access 2000 database. The table names are
unknown...they could have any name. Through VBA how can I append one table to
the other?
 
Hi,
you can run append query:

currentdb.execute "Insert into " & strTable1 & " (Field1, Field2) Select
Field1, Field2 From " & strTable2, dbfailonerror

Where strTable1 and strTable2 variables hold tables names

--
Best regards,
___________
Alex Dybenko (MVP)
http://accessblog.net
http://www.PointLtd.com
 
Back
Top