A
Afrosheen via AccessMonster.com
Thanks again for taking the time to read this.
I have a table called tblTaps. It has a yes/no and a date entered field in it,
besides other fields. Those are the ones I'm concerned about.
What I want to do is after about 3 years I want Access to delete these
records. I found a routine on here that goes by 7 days. But I want to go out
farther. Here's the code:
DELETE * FROM TableName WHERE FieldName <= Date()-7;
What I would have to check on is two variables. The yes/no and the date
entered field would have to checked on to see if they meet the criteria. I'd
like to set it up so a box would come up after 30 days stating something like
"You need to perform your yearly maintenance". That part I can do.
I'm just not sure about the code for deleting the records older than 3 years.
Any suggestions would be greatly appreciated.
Thank you for any help.
I have a table called tblTaps. It has a yes/no and a date entered field in it,
besides other fields. Those are the ones I'm concerned about.
What I want to do is after about 3 years I want Access to delete these
records. I found a routine on here that goes by 7 days. But I want to go out
farther. Here's the code:
DELETE * FROM TableName WHERE FieldName <= Date()-7;
What I would have to check on is two variables. The yes/no and the date
entered field would have to checked on to see if they meet the criteria. I'd
like to set it up so a box would come up after 30 days stating something like
"You need to perform your yearly maintenance". That part I can do.
I'm just not sure about the code for deleting the records older than 3 years.
Any suggestions would be greatly appreciated.
Thank you for any help.