run an append query and then delte records

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I want to run a query (append?) and then delete the records that were
appended. But I want to do this with one query instead of a macro.
 
George said:
I want to run a query (append?) and then delete the records that were
appended. But I want to do this with one query instead of a macro.

I need more information.

You could create a temporary table (empty) with the same fields as your
original table (MakeTable query) and append records to it (Append Query) via
a form. You could query that temporary table to your hearts content, or
delete it with a Delete query. (Be careful not to accidentally delete your
original table.)

Something like this is relatively easy to set up, but I would need more
details.
 
I just want to kill two birds with one stone: append and then delete appended
records. Can I do this with one query without any other hocus-pocus?
 
If you mean you want to use one query to do both actions, then as far as I
know it cannot be done.

This requires two separate queries.
 
Actually,
You should be able to do this with a VBA script...Place a command button
your form. Then design the query in Acccess, use the SQL view copy the append
query:

Private Sub
domcd.RunSQL "past the append query string"
domcd.runSQL "paste the delete query string"
End Sub

Click on the button and walla. Oh and I do this all the time! email me your
SQL String if you need more help. (e-mail address removed)
 
Back
Top