Backup / Remove Records

  • Thread starter Thread starter Greg Staley
  • Start date Start date
G

Greg Staley

I would like to use a button to backup and then remove records that are older
than the current date. I was looking at a make table query to move the records,
but when I tried to do that twice Access deletes the origional make a table
query table and saves the new one in its place.

Is there a way to remove the records and then place them in another table?

Greg Staley
The of Access Confused
 
Now that you've got your archive table created via the make table query,
change your make table query to an append query.

You'd run the append query, and then run a delete query to remove them (not
the other way around).
 
Sure, in the OnClick event for the button, choose Event Procedure and click
on the build button (...).

Between the two lines generated for you put:

Dim db as database
Set db = CurrentDb()
db.execute "query1", dbFailOnError
db.execute "query2", dbFailOnError
Set db = nothing
 
Back
Top