Backup / Remove Records

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
 
J

Joan Wild

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).
 
G

Guest

Can I run 2 queries with 1 button. Let's pretend they are named query1 and
query2


Greg
 
J

Joan Wild

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top