What is wrong with INSERT INTO IN?

  • Thread starter Thread starter DIOS
  • Start date Start date
D

DIOS

Im working within an Access2000 database and writing code in VBA. What
i want to do is connect to an Access97 database through DAO and query
a table and import those records into my Access2000 database. The
tables have the same name and are similar in structure except they
have different names for fields. Ive been trying this mehtod but i
just cant seem to get it right:

Set db = ws.OpenDatabase(dbOld, True, True)

sSQL = "INSERT INTO tblGroup IN '" & CurrentDb.Name & "' " & _
"SELECT tblGroup.* FROM tblGroup.*;"

db.Execute sSQL

What am I doing wrong?

AGP
 
This surprised me, I know the answer, (I think).

I think the IN is only needed when you an external DB as in
"C:\folder\mydb.mdb".

SO if you flip your external with internal source and it may work.
 
Back
Top