Archiving records

  • Thread starter Thread starter Maz Ten
  • Start date Start date
M

Maz Ten

I am currently archiving records to another table by creating an Append
query then a Delete query.
The Append query appends the required data to the archive table.
The Delete query then deletes the archived records from the original table.
This all works fine but I have to do that procedure 6 times
first for the main table data then for all the related tables.

Is there an easier way to archive records wether they are related tables or
not.

Thanks in advance

Maz T
 
You can write a Macro using a number or OpenQuery (or
RunSQL) macro actions to execute your Queries / SQL String
one after another.

OTOH, you really should take advantage of the Transactions
in VBA to pair the Append/Delete so that either both
actions are done or neither are done rather than just
Append without Delete.

Check Access VB Help (DAO) on "BeginTrans, CommitTrans,
Rollback Methods"

HTH
Van T. Dinh
MVP (Access)
 
Back
Top