Append 2 tables with variable names

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?
 
A

Alex Dybenko

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top