INSERT records from local Access-DB to another Access-DB

J

juvi

Hello,

How can I manage this: I have got a table in my FE_DB.mdb and the same table
in BE_DB.mdb

I want to INSERT all records from table (FE) to table (BE) which are not
existing in table (BE). I would also need the count of records successfully
inserted into table (BE). How can I do this´in ACCESS-VBA. Please help me.

thx
 
D

Douglas J. Steele

Try a query along the lines of:

INSERT INTO [;database=E:\Folder\BE_DB.mdb].MyTable (ID, Field1, Field2,
Field3)
SELECT ID, Field1, Field2, Field3
FROM MyTable
WHERE ID NOT IN (SELECT DISTINCT ID FROM
[;database=E:\Folder\BE_DB.mdb].MyTable)
 

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