Appending Records from One table to another
I thank those who responded to my question of appending records from one table in a database to another table in another database. The code is in VB6 using Access2000 as the database.
I am having problem of the system not able to recognise the second table. I know I am not representing the second table/database well.
Here is my code:
Dim mydb1 as database
dim mydb2 as database
.
.
set mydb1=workspaces(0).Opendatabase(mydata1.mdb) ' contains table1
set mydb2=workspaces(0).Opendatabase(mydata2.mdb) ' contains table2
.
.
mydb1.execute "INSERT INTO table1 select * FROM ...."
The system recognises table1 but what do I write after FROM for the system to recognise table2 that is in mydb2.
May be my coding is not correct. Please help me.
-Tallon
|