Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Append from query and then delete

Status
Not open for further replies.

mguidry

Technical User
Oct 14, 2004
18
0
0
US
I'm trying to make a query that will append data from one table to an identical table, then delete the data from the source table. Is there a way to do this without making two separate queries (one append, and one delete)? This may be a routine task, and I'm just appending/deleting one record at a time (criteria based).
 
If you are looking at the record to move to another table from a form
then have a look at
thread702-864326

Hope this helps
Hymn
 
actually, I'm not doing this from a form. I will if I have to. Just appending one recordset from one table to another based on criteria on an indexed field, then needing to delete the datasource recordset after the append is complete.
 
Is there a way to do this without making two separate queries (one append, and one delete)?
The short answer is NO.
You can't, in a single SQL instruction, do an INSERT and a DELETE.

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ222-2244
 
Thanks. I made two queries (one append, and one delete) and called them sequentially from a form with a command button. The form has unbound fields which are used in query criteria expressions to append and delete only specified records. Thanks for the input.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top