Copy table (1 Viewer)

meenctg

Learn24bd
Local time
Today, 09:48
Joined
May 8, 2012
Messages
133
How can copy table from another mdb file in current opened mbd file? If copy table is exist in current file table will be replaced. Please anyone help me.
 

plog

Banishment Pending
Local time
Yesterday, 21:48
Joined
May 11, 2011
Messages
11,646
How often do you forsee this occuring? IF its a one time deal, you copy from the good database, right click in the one you want to update and then paste it--choosing to overwrite the existing table in that database.

If its going to occur regularly, then I would think about not doing it, but instead having that table be a linked table. That way its always looking at the good data source and you don't have to touch a thing.

Why can't you use a linked table for this?
 

Mihail

Registered User.
Local time
Today, 05:48
Joined
Jan 22, 2011
Messages
2,373
Change one of the names before copy. :)
 

meenctg

Learn24bd
Local time
Today, 09:48
Joined
May 8, 2012
Messages
133
Change one of the names before copy. :)
I have a table in my db name is account. I always backup this table by run a macros with command button. Here i wanna add another button for copy account table from c:\backup.mdb file in my current opened database file. That's why i wanna know how can I'll copy table from another mdb file in my current opened database.
 

Mihail

Registered User.
Local time
Today, 05:48
Joined
Jan 22, 2011
Messages
2,373
How often do you forsee this occuring? IF its a one time deal, you copy from the good database, right click in the one you want to update and then paste it--choosing to overwrite the existing table in that database.
This will not break the existent relationships ? Thank you.
 

plog

Banishment Pending
Local time
Yesterday, 21:48
Joined
May 11, 2011
Messages
11,646
This will not break the existent relationships ?

My method will not, yours might. Let's say you are replacing TableA. If you copy over the top with the same name, select 'Ok' in the warning that appears, then the relationships remain the same. TableA always existed in the database and was always named TableA.

If you rename TableA to copyTableA, then paste in your new table with the name TableA, Access probably autoupdated everything and pointed it to copyTableA. When you rename a table with relationships or used by a form, query or report, it helps you out by updating everything with the new name. So when you paste in TableA after the renaming it stands alone because all those forms, queries and reports have changed to look for copyTableA.

Again, though linked tables would be the best way probably.
 

meenctg

Learn24bd
Local time
Today, 09:48
Joined
May 8, 2012
Messages
133
Again, though linked tables would be the best way probably.

I know about link table. I wanna know about what i am exactly want in my post. If is it possible please tell me how can coding for this?
 

plog

Banishment Pending
Local time
Yesterday, 21:48
Joined
May 11, 2011
Messages
11,646
And I would like to know more about the situation.

1. How often is this going to occur?

2. Why does it need to occur like this?

3. Why are you not using a linked table?
 

Users who are viewing this thread

Top Bottom