View Single Post
  #3  
Old April 25th, 2004, 03:35 PM
Duane Hookom
external usenet poster
 
Posts: n/a
Default merging databases

With 150 tables, I expect there are tables with records related to
autonumbers from other tables. A simple append query will not update the
related records.

You could try run code that would set all of the autonumber fields in the
"copies" to standard, long integer fields. If you have referential integrity
set on with cascade updates, you should be able to update the previous
autonumber fields to numbers greater than the autonumber fields in the
original mdb. This should allow you to append the records from the copies to
ther original. NOTE: I would test this prior to doing this with live mdbs.

--
Duane Hookom
MS Access MVP


"Marin Kostov" wrote in message
...
Use Append Query.
Here is how to do it:
Let's say, you have two tables, tblMain, which is the first table, and
tblSecond, which contains the records you need to append to the first

table.
So, open the Queries object, and create new Query in Design View. In the
Show Table dialog, select tblSecond and click Add. Close the window.
Then change the Query to Append. In the Append to select tblMain.
Drag all fields from tblSecond to the lower pane, except the Primary Key.
Then click the ! sign to run the Query.
Answer Yes to the question.
You are ready. You have append the fields, and the Autonumber is generated
by Access. You don't need to worry about it.

--
Marin Kostov
Microsoft Office XP Master Instructor