The SQL to select the records that are 90+ days old would be:
Code:
Select TrackingTable.* From TrackingTable Where TrackingTable.DATEPROCESSED < (Date() - 90)
or
Code:
Select TrackingTable.* From TrackingTable Where TrackingTable.DATEPROCESSED < (DateAdd("d", 90, Date())
To delete the same records use:
Code:
Delete TrackingTable.* From TrackingTable Where TrackingTable.DATEPROCESSED < (Date() - 90)
I normally NEVER delete records like this. I use a "deleted" flag or "archived" flag. I then filter out the records marked are deleted or archived from all the queries/forms/reports, etc.
At some scheduled DB maintenance time:
1) Take the database off line.
1) Mmake a backup
2) Export all the record marked as archived/deleted
3) Compact and the database. This is important after mass updates.
Boyd Trimmell aka Hitechcoach
Microsoft Access MVP
Started with Access 2.0. Now using the latest version of Access.