clearing table entries

skate

Registered User.
Local time
Today, 19:58
Joined
May 22, 2002
Messages
136
this may be a simple question, but i just can't figure it out. I have a database who's entries need to be cleared to zero at the end of every year. I would prefer to do this than just delete all records as there is some data that needs to be saved. I can't simply highlight all the cells in the table and press clear/zero. How can I do this?

Thanks
 
How about creating a history table. Run a query for everything from the table, then change it to a MAKR TABLE QUERY. Name the new table tblHistory,. Once you have created the new table (and transfered some data) change ti to an append query, with the tblHistory as the target. Now copy and paste the query in the database window, and name it delqryCleanUp. Open it in design view, and change the type to DELETE QUERY.

Now you can add a command button or code to automate the process by triggering the Append query then the delete query. It will saftley copy the data to the history table and then delete it from the original table. If there are possible issues regarding duplicate records, in the append query create a field called HistTranDate and make it equivelent to todays date (essentiall adding a field to the tblHistory that would contain the data the data was transfered).

Just a thought, I hope you find it helpful.
 

Users who are viewing this thread

Back
Top Bottom