importing mdb <> mdb

  • Thread starter Thread starter kresten
  • Start date Start date
K

kresten

Guest
Hello,

I wonder if I can create VBA code to import a table with participants from 1 database to another one and simply let it add only the new records.

Both databases are identical in name, tablename and fields. The database with the source is not always "online" so I think linking will not be an option.

Any clues ?

THX
 
DoCmd.TransferDatabase(

see what you can find, or some one else with an example may post aswell.
 
it is not possible to have the exact same name because the database's path is part of the name. currentdb.name
 
Thanks for the info:

So if I use a different MDb name AND tablename for the source database, then I will be able to import only the new records ?
 
No no no... I was just saying there's no such thing as having the identical name on the same computer - Windows will not allow it. The full name of a file includes it's path.

If you want to transfer only new records check out Append Queries using a JOIN and look into WHERE Not Exists (table1.field1 = table2.field1, table1.field2 = table2.field2, and so on)
 
Last edited:

Users who are viewing this thread

Back
Top Bottom