Thanks for the help. I have two related tables in each of those Access files.
My mission is to combine/append all those 5 acess files with identical two
related tables in each and make them into one big file. I don't even care if
there is duplicate for now. I just want to find an automated way to combine
the 5 into one big one. In another words, if there are 5 records in each
file, I want to have a file that has 25 records.
Thanks.
Still a few questions! Do you have Autonumber fields in any of these tables?
If so you might have records numbered 1, 2, 3, 4, 5 in one database, 1, 2, 3,
5, 6 in a second, 1, 2, 3, 4, 5 in a third. Worse, these might be linked to
foreign keys in other tables - so that you can't tell (after merging) WHICH of
the five #3 records you mean!
If that's not an issue, you can choose one database as the target, and use
File... Get External Data... Link on the menu to link to the tables in another
database. Create Append queries based on the linked table, and append to the
local table. These could include a calculated field if you want to track which
database was the source of the data.
If you *DO* have duplicate autonumber primary keys, it gets harder. You may
want to check the range of autonumber values in each database, and assign
(say) 100000 number blocks for each database. Use an append query adding
100000 for database A, 200000 for database B etc. to the autonumber value *and
to each foreign key value in the other tables*.
This can be tricky - back everything up first of course!!