What is wrong with INSERT INTO IN?

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.
 

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