moving table from one datbase to another (1 Viewer)

bigmac

Registered User.
Local time
Yesterday, 17:18
Joined
Oct 5, 2008
Messages
295
hi all can you help please, I have two databases both with a table called [new load],can I move one table to the other database and overwrite the other table?

if yes how? and what pitfalls have I got to watch out for ? :confused:
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:18
Joined
Oct 29, 2018
Messages
21,467
Hi. Care to elaborate on why you need to do something like this? It may be you don't have anything to worry about or we might say don't do it, depending on the actual situation.
 

NauticalGent

Ignore List Poster Boy
Local time
Yesterday, 20:18
Joined
Apr 27, 2015
Messages
6,330
Yes you can. You would do it by using the External —> Import —> Access group menu. Depending in which version of Access you have the actual menu sequence may differ slightly, but it is pretty straight-forward.

As far as pitfalls go, if the table structure is identical then there should be no issues. If they are different, any objects that are dependent on them, such as queries, forms and reports, may have to be redone.
 

isladogs

MVP / VIP
Local time
Today, 01:18
Joined
Jan 14, 2017
Messages
18,216
If there is a good reason (do explain why) you can do it as NG suggests or you can open both databases side by side and drag the table to the new dB.
However you do it, it won't overwrite the original with the same name. Instead it will create a new table with a '1' at the end.
You can avoid that by deleting the original first or just rename the new table afterwards
 

Cronk

Registered User.
Local time
Today, 10:18
Joined
Jul 4, 2013
Messages
2,772
And to answer the other question in the OP
and what pitfalls have I got to watch out for ?


Are there any records which are related to those in the table being replaced? You might have cascaded deletes in the other tables or orphaned records.
 

bigmac

Registered User.
Local time
Yesterday, 17:18
Joined
Oct 5, 2008
Messages
295
Hi. Care to elaborate on why you need to do something like this? It may be you don't have anything to worry about or we might say don't do it, depending on the actual situation.

hi all sorry for delay, the reason for doing this is that I have found that a user has taken a copy onto his desktop and updated some records in the table , I need to copy this table into the original database to get it back on track
 

theDBguy

I’m here to help
Staff member
Local time
Yesterday, 17:18
Joined
Oct 29, 2018
Messages
21,467
hi all sorry for delay, the reason for doing this is that I have found that a user has taken a copy onto his desktop and updated some records in the table , I need to copy this table into the original database to get it back on track
In that case, you could copy the table (or just link to it) using a different name, so you can use queries against it to decide which records to catch up. I wouldn't "overwrite" the original table.
 

Users who are viewing this thread

Top Bottom