Transfer from one table to another one in the same database

  • Thread starter Thread starter jeanhurtado
  • Start date Start date
J

jeanhurtado

Hi, my name is Jean C. and well trying to finish a project. I have the
following problem, I have two tables "Costtable" and
"BackupCosttable". I want a command button to transfer all records
from the "Costtable" table to BackupCosttable" table. I want to make
sure the transfer was succeed and also a button that can transfer the
records from BackupCosttable" to "Costtable" in case of a transfer
corruption in the "Costtable". Can you help me?Thanks for your
cooperation. Hope you have a nice day.
 
Hi, my name is Jean C. and well trying to finish a project. I have the
following problem, I have two tables "Costtable" and
"BackupCosttable". I want a command button to transfer all records
from the "Costtable" table to BackupCosttable" table. I want to make
sure the transfer was succeed and also a button that can transfer the
records from BackupCosttable" to "Costtable" in case of a transfer
corruption in the "Costtable". Can you help me?Thanks for your
cooperation. Hope you have a nice day.

Well... this is wasted effort, most likely.

If your database gets corrupted, you're very likely to lose BOTH tables.

If you want to back up your data, it's very much preferable to (quite outside
of Access) make a backup copy of your entire MDB file.

If you want to do this anyway, for some reason that I'm not seeing, an Append
query will do the job - you'll need two queries, one for each direction.
However, if a table becomes corrupted, you won't be able to append to it;
you'll need to delete it, compact and repair the database, and then recreate
it before you can append.

John W. Vinson [MVP]
 
Well... this is wasted effort, most likely.

If your database gets corrupted, you're very likely to lose BOTH tables.

If you want to back up your data, it's very much preferable to (quite outside
of Access) make a backup copy of your entire MDB file.

If you want to do this anyway, for some reason that I'm not seeing, an Append
query will do the job - you'll need two queries, one for each direction.
However, if a table becomes corrupted, you won't be able to append to it;
you'll need to delete it, compact and repair the database, and then recreate
it before you can append.

John W. Vinson [MVP]


Thanks Mr. John for your help. The pourpose of this backup is because
the "Costtable" is a table that it will receive a spreedsheet transfer
(update cost pourposes) and if the excel file gets corrupt then
the"BackupCostTable" will revert it contents to the "Costtable" again.
Hope you understand. My pourposes is to avoid a lost of data if the
transfer fails.
 
Thanks Mr. John for your help. The pourpose of this backup is because
the "Costtable" is a table that it will receive a spreedsheet transfer
(update cost pourposes) and if the excel file gets corrupt then
the"BackupCostTable" will revert it contents to the "Costtable" again.
Hope you understand. My pourposes is to avoid a lost of data if the
transfer fails.

I'd still recommend backing up the entire MDB. A transfer gone bad (say a
network dropout during the process) is just as likely to corrupt the entire
..mdb as it is to selectively damage the target table.

John W. Vinson [MVP]
 
Back
Top