Archive and delete

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

Guest

I am trying to retrieve some information from one query, move this
information to another table and delete the oringinal from its source. i
thought about using modules but i have no idea how to use them.

Can anyone give me any suggestions ? ! thank you
 
Why?

Just filter out the old data in your queries. There is no need to make an
"archive" table in the same database when you can simply filter out old
records.

Rick B
 
Yes but i want to get rid of it from the original table. The reason for this
is that i require old records to be archived for future reference, but would
refer to these very rarely. Am i right in assuming that i need to create one
query that retrieves the records, another that deletes the records and then
create a module to run one query after the other automatically? If so how do
i go about doing this?

Thanks
 
Thanks for the link, it does help BUT what i am actually doing is running the
two queries through an interface designed in Dreamweaver. The orignial table
is named TblAssets and the archive one TblArchive. Ive created the two
tables and also the two queries required, but they dont seem to work. I have
followed exactly what you have told me, when i run the append query is comes
up with the error: "Query must have at least one destination field" but it
does have a destination defined. Also what does this stand for in the VB
code

ws.BeginTransaction

This keeps coming up as an error. Can anyone help please, urgently.

Thanks
 
Hi Kaylay,

I'm sorry but I am not familiar with Dreamweaver
(except for the song). John's code works in
Access by starting a transaction, and only if both
the append and delete queries succeed, does it
complete the transaction. If either query fails, then
it rolls back any changes. I don't know how Dreamweaver
might handle this.

If you provide the SQL strings for your append and
delete queries, I could try to help you construct them
according to what Access would want (at least).

Gary Walter
"Kaylay" wrote ....
 
Back
Top