query to purge old data

jarheadjim

Registered User.
Local time
Today, 15:54
Joined
Mar 6, 2002
Messages
83
I'm making a database to keep track of items checked in/out of my work-center. But I only need to track items for the last 90 days from the "date out". If anyone could point me in the right direction I would appreciate it. Thanks
 
If you want to delete the records then a delete query with <=Date()-90 in the dates criteria field will do the trick. Or you can use the same criteia to view only data from the last 90 days and not delete the records.
 
I did that, and it works too well! It deletes entries I made today as well as old ones. I placed the argument next to "criteria" and I ensured that I had "when" selected from the pulldown menu. Any further guidence?
 
>= Date()-90 to VIEW records within the last 90 days.
< Date()-90 to DELETE records older than 90 days.

I would run even your delete criteria as a select query first to see if it's selecting the right records.
If that doesn't fix it, post the SQL of your query here (View>SQL, Copy, Paste here)

HTH,
David R
 

Users who are viewing this thread

Back
Top Bottom