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 wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Automate archiving

Status
Not open for further replies.

1starr

Programmer
Feb 19, 2002
34
US
I was wondering has anyone come up with a way to automate archiving old records after they have reach a certain time period, like anything over 6 months old? If there is a way your assistant would be greatly appreciated.
 
I setup the following procedures for a database I worked on....

I created a separate database to hold my archived data. I copied the data table to this new database and emptied it so I know the structures were identical. I created a link to the archive table in my main table. I then created an append query that selected any data older than three months and with a closed status (these were customer calls) from the data table and appended it to the archive table. I followed this with a delete query against the data tablewith the same criteria. At first this was a button on an administrative type form I had, but I eventually create some code that ran everytime the db opened to perform these two qeuries....

Simple and effective. ****************************
Only two things are infinite, the
universe and human stupidity, and
I'm not sure about the former.
(Albert Einstein)

Robert L. Johnson III
MCSA, CNA, MCP, Network+, A+
w: robert.l.johnson.iii@citigroup.com
h: wildmage@tampabay.rr.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top